/* public/styles.css */

/* We use @layer components to tell Tailwind these are reusable component classes */
@layer components {
  .input-style {
    @apply w-full bg-gray-700 text-white border border-gray-600 rounded-md py-2 px-3 focus:outline-none focus:border-blue-500;
  }
  .btn-primary {
    @apply bg-blue-600 text-white font-bold cursor-pointer px-6 py-2 rounded-md hover:bg-blue-700 disabled:bg-gray-500;
  }
}

/* This is a simple trick to make Tailwind's special @apply rule work with the CDN */
body {
    font-family: 'Inter', sans-serif; /* A nice default font */
}

/* Fix for invisible text in input fields */
.input-style {
    color: #1f2937; /* A dark gray color */
}


.category-card {
    @apply block p-6 bg-gray-800 rounded-lg shadow-lg border border-transparent hover:border-blue-500 transition-all duration-300 transform hover:-translate-y-1;
}

.logo-container {
    @apply w-16 h-16 bg-gray-700 rounded-full flex items-center justify-center;
}

.view-services-link {
    @apply block mt-6 text-blue-400 font-semibold opacity-0 group-hover:opacity-100 transition-opacity duration-300;
}

.dropdown-item {
    @apply flex items-center px-4 py-3 text-sm font-medium text-gray-300; /* Increased vertical padding (py-3) */
    @apply transition-colors duration-150;
    @apply hover:bg-gray-700 hover:text-white;
}

.mobile-menu-item {
    @apply flex items-center w-full p-4 text-lg font-medium text-gray-300 rounded-lg;
    @apply transition-colors duration-200;
    @apply hover:bg-gray-700 hover:text-white;
}

/* New class for the selected service/country button */
.active-service {
  @apply border-blue-500 ring-2 ring-blue-500;
}

/* === NEW: REUSABLE SECONDARY PAGE HEADER === */

/* The main header container: full-width, gradient, border */
.secondary-header {
    background-image: linear-gradient(to bottom, #2a374a, #1F2937);
    border-bottom: 1px solid #374151;
    width: 100%;
    padding: 1rem 1.5rem; /* Desktop padding */
    margin-bottom: 2rem;
}

/* An inner container to keep content aligned with the rest of the page */
.secondary-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 90rem; /* Corresponds to max-w-7xl + padding */
    margin: 0 auto;
}

/* Left side of the header (Brand Name + Home Icon) */
.secondary-header .brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* space between icon and name */
    text-decoration: none;
}
.secondary-header .brand-link .home-icon {
    width: 1.5rem; /* h-6 w-6 */
    height: 1.5rem;
    color: #9CA3AF; /* text-gray-400 */
    transition: color 0.2s ease-in-out;
}
.secondary-header .brand-link:hover .home-icon {
    color: #8B5CF6; /* Purple on hover */
}
.secondary-header .brand-link h1 {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700;
    /* The signature gradient text */
    background-image: linear-gradient(to right, #EC4899, #8B5CF6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Right side of the header (Balance + Menu) */
.secondary-header .user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.secondary-header .balance-display {
    text-align: right;
}
.secondary-header .balance-display span:first-child {
    display: block;
    font-size: 0.75rem; /* text-xs */
    color: #9CA3AF; /* text-gray-400 */
}
.secondary-header .balance-display span:last-child {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    color: #4ADE80; /* text-green-400 */
}

/* Main Page Title (sits below the header) */
.page-title-container {
    max-width: 90rem; /* Corresponds to max-w-7xl */
    width: 100%;
    margin: 0 auto 1.5rem auto;
    padding: 0 1.5rem;
}
.page-title-container h2 {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;
}
.page-title-container p {
    color: #9CA3AF; /* text-gray-400 */
    margin-top: 0.25rem;
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    .secondary-header {
        padding: 0.75rem 1rem;
    }
    .secondary-header .brand-link h1 {
        font-size: 1.25rem; /* text-xl */
    }
    .secondary-header .balance-display span:last-child {
        font-size: 1.125rem; /* text-lg */
    }
    .page-title-container {
        padding: 0 1rem;
    }
    .page-title-container h2 {
        font-size: 1.875rem; /* text-3xl */
    }
}

/* public/styles.css */

/* === FINAL MOBILE FIX FOR SECONDARY HEADER STATS === */
@media (max-width: 768px) {
    /* Target the container for both stats */
    .secondary-header .user-stats {
        gap: 0.5rem; /* Reduce space between the two stat blocks */
    }
    .secondary-header .user-stats .pl-3 {
        padding-left: 0.5rem; /* Reduce padding on the balance block */
    }

    /* Target the labels ("Total Spent", "Your Balance") */
    .secondary-header .user-stats span:first-child {
        font-size: 0.6rem; /* Make labels extra small */
    }

    /* Target the dollar values */
    .secondary-header .user-stats span:last-child {
        font-size: 0.8rem; /* text-sm: Make values smaller */
        line-height: 1.25rem;
        font-weight: 600;
    }
}

/* === START: REUSABLE TRANSFORMING FAB === */

.transforming-fab {
    /* Always-visible Positioning */
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;

    /* Appearance */
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: #3B82F6; /* Blue for Telegram */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: none;
    cursor: pointer;
    
    /* Center the icon */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Smooth transitions for color change and hover effect */
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.transforming-fab:hover {
    transform: scale(1.1); /* Simple, clean hover effect */
}

/* This class will be added by JavaScript when the user scrolls down */
.transforming-fab.scroll-mode {
    background-color: #4F46E5; /* Indigo for Scroll-to-Top */
}

.transforming-fab svg {
    width: 2rem;
    height: 2rem;
    color: white;
    /* This makes the icon swap feel smoother */
    transition: opacity 0.2s ease-in-out;
}

/* === END: REUSABLE TRANSFORMING FAB === */

/* ================================================================= */
/* === TITANIUM THEME INJECTION (Cosmic Background & Glass UI) === */
/* ================================================================= */

/* 1. Global Cosmic Background (Applies to all pages) */
body {
    background-color: #020617 !important; 
    background-image: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #020617 60%) !important;
    background-attachment: fixed; /* Keeps the galaxy still while you scroll */
    color: #cbd5e1; /* Premium Slate Text */
}

/* 2. Glassmorphism for Cards (Dashboard, Rent, Tickets) */
/* We target the standard container color but EXCLUDE the mobile menu */
.bg-gray-800:not(#mobile-menu):not(.mobile-menu-content):not(.mobile-menu-item) {
    background-color: rgba(15, 23, 42, 0.65) !important; /* Semi-transparent */
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important; /* Subtle glow border */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

/* 3. Mobile Menu - PC & TABLET SETTINGS (Default) */
#mobile-menu {
    /* PC looks better with a darker, more solid glass so text is readable */
    background-color: rgba(15, 23, 42, 0.5) !important; 
    
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* 4. Mobile Menu - PHONE ONLY SETTINGS (Overrides the above) */
@media (max-width: 768px) {
    #mobile-menu {
        /* --- SIZE TWEAK --- */
        width: 65% !important; /* Was 75%. 65% shows more background but keeps text safe. */
        
        /* --- GLASS SETTINGS --- */
        background-color: rgba(15, 23, 42, 0.5) !important; 
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
    }
}

/* 4. Premium Inputs (Dark Glass Look) */
/* Targets all text inputs to match the theme */
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
select, 
textarea,
.premium-input {
    background-color: rgba(2, 6, 23, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    transition: all 0.3s ease;
}

/* Input Focus Glow */
input:focus, select:focus, textarea:focus, .premium-input:focus {
    border-color: #6366f1 !important; /* Indigo */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    outline: none !important;
}

/* 5. Dropdown Options Menu (The list that appears when clicking a service) */
.custom-select-options {
    background-color: #0f172a !important; /* Solid dark background for readability */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* 6. Secondary Headers (Account, Rent, etc.) */
.secondary-header {
    background: linear-gradient(to bottom, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8)) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}