/* styles.css - RankForge Styles */

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar-transition {
    transition: width 0.3s ease-in-out;
}

.nav-text {
    transition: opacity 0.2s ease-in-out;
    white-space: nowrap;
}

.collapsed .nav-text {
    opacity: 0;
    display: none;
}

.collapsed .logo-full {
    display: none !important;
}

.collapsed .logo-icon {
    display: block !important;
}

.logo-icon {
    display: none;
}

.collapsed nav a,
.collapsed nav button {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.collapsed nav a i,
.collapsed nav button i {
    margin-right: 0;
}

/* ============================================
   COMPONENTS
   ============================================ */

.api-key-box {
    font-family: 'Courier New', monospace;
    letter-spacing: -0.5px;
}

/* Toggle Switch */
.toggle-checkbox:checked {
    right: 0;
    border-color: #7c3aed;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #7c3aed;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ============================================
   TOOLTIPS
   ============================================ */

.tooltip {
    position: relative;
    display: inline-flex;
}

.tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    text-transform: none;
    line-height: 1.4;
    border-radius: 8px;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 50;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Dark mode tooltip */
.dark .tooltip::after {
    background: #374151;
}

.dark .tooltip::before {
    border-top-color: #374151;
}

/* ============================================
   MOBILE
   ============================================ */

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-gradient {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.15);
}
