/**
 * Premium Light-Themed Glassmorphism & Responsive Styles for LifterLMS Companion App.
 *
 * @package    LifterLMS_Companion_Gateway
 * @subpackage Assets/CSS
 * @since      1.0.0
 */

:root {
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-bg-hover: rgba(59, 113, 243, 0.05);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-focus: rgba(59, 113, 243, 0.25);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  --accent-neon-green: #10b981;
  --accent-neon-blue: #3b71f3;
  --accent-neon-purple: #7209b7;
  --text-primary: #212529;
  --text-secondary: #6c757d;
}

/* Dashboard Base container */
.llms-glass-dashboard {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  margin: 15px 0;
}

/* Light Glass Header */
.llms-glass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.llms-student-profile-summary {
  display: flex;
  align-items: center;
  gap: 15px;
}

.llms-student-avatar-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--accent-neon-blue);
  box-shadow: 0 4px 12px rgba(59, 113, 243, 0.15);
  object-fit: cover;
}

.llms-student-greeting-text {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #212529;
}

.llms-student-tagline {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: 3px 0 0 0;
}

.llms-dashboard-clock {
  font-size: 0.85rem;
  color: #495057;
  background: #f8f9fa;
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid var(--glass-border);
}

/* Tab Navigation buttons */
.llms-glass-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.llms-glass-nav-btn {
  background: #f8f9fa;
  border: 1px solid var(--glass-border);
  color: #495057;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.llms-glass-nav-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--accent-neon-blue);
  color: var(--accent-neon-blue);
}

.llms-glass-nav-btn.active {
  background: var(--accent-neon-blue);
  border-color: var(--accent-neon-blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 113, 243, 0.25);
}

/* Panel transitions */
.llms-dashboard-tab-panel {
  display: none;
}

.llms-dashboard-tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* Cards grids */
.llms-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.llms-glass-card {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  transition: all 0.25s ease;
}

.llms-glass-card:hover {
  border-color: var(--accent-neon-blue);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.llms-card-image-wrap {
  width: 100%;
  height: 145px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #f1f3f5;
  border: 1px solid rgba(0,0,0,0.04);
}

.llms-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.llms-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 8px 0;
  color: #212529;
}

/* Modern Progress bars */
.llms-progress-wrapper {
  margin: 12px 0;
}

.llms-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.llms-progress-bar-bg {
  background: #e9ecef;
  height: 6px;
  border-radius: 30px;
  overflow: hidden;
}

.llms-progress-bar-fill {
  background: linear-gradient(90deg, var(--accent-neon-blue), var(--accent-neon-purple));
  height: 100%;
  width: 0%;
  border-radius: 30px;
}

/* Call To Actions buttons */
.llms-glass-btn {
  background: var(--accent-neon-blue);
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: 0.88rem;
}

.llms-glass-btn:hover {
  background: #2554d7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 113, 243, 0.25);
}

/* Skeletons loader */
.llms-skeleton-card {
  height: 220px;
  background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

/* Ledger table styling */
.llms-ledger-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.llms-ledger-table th,
.llms-ledger-table td {
  padding: 10px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--glass-border);
}

.llms-ledger-table th {
  color: var(--text-secondary);
  font-weight: 600;
  background: #f8f9fa;
}

.llms-earning-payout-total {
  background: #f8f9fa;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.llms-payout-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-neon-green);
}

.llms-instructor-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .llms-instructor-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile My Account Sidebar collapse and toggle layout */
@media (max-width: 768px) {
  .woocommerce-MyAccount-navigation {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 25px !important;
    padding: 0 !important;
    overflow: hidden;
  }
  
  .woocommerce-MyAccount-navigation::before {
    content: "☰ Navigation Options";
    display: block;
    padding: 12px 18px;
    font-weight: 700;
    color: #3b71f3;
    cursor: pointer;
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
  }
  
  .woocommerce-MyAccount-navigation ul {
    display: none; /* Collapsed by default */
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .woocommerce-MyAccount-navigation ul.show-mobile-menu {
    display: block !important;
  }
  
  .woocommerce-MyAccount-navigation ul li {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  .woocommerce-MyAccount-navigation ul li a {
    display: block !important;
    padding: 10px 18px !important;
    color: #495057 !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
  }
  
  .woocommerce-MyAccount-navigation ul li.is-active,
  .woocommerce-MyAccount-navigation ul li.active {
    background: rgba(59, 113, 243, 0.05);
  }

  .woocommerce-MyAccount-navigation ul li.is-active a,
  .woocommerce-MyAccount-navigation ul li.active a {
    color: #3b71f3 !important;
  }
}

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

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   MODERN WOOCOMMERCE MY ACCOUNT STYLING OVERRIDES (LOGIN & LOGGED-IN PORTAL)
   ========================================================================== */

/* 1. Login & Registration Forms Layout (When Not Logged In) */
.woocommerce-account .woocommerce .u-columns.col2-set,
.woocommerce-account .woocommerce #customer_login {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 550px !important;
    margin: 0 auto !important;
    gap: 0 !important;
}

.woocommerce-account .woocommerce .u-column1,
.woocommerce-account .woocommerce .u-column2,
.woocommerce-account .woocommerce .col-1,
.woocommerce-account .woocommerce .col-2 {
    width: 100% !important;
    max-width: 550px !important;
    background: #ffffff !important;
    padding: 40px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s ease !important;
    margin-bottom: 20px !important;
}

.woocommerce-account .woocommerce .u-column1:hover,
.woocommerce-account .woocommerce .u-column2:hover,
.woocommerce-account .woocommerce .col-1:hover,
.woocommerce-account .woocommerce .col-2:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.05) !important;
}

.woocommerce-account .woocommerce h2 {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 25px !important;
    border-bottom: 2px solid rgba(59, 113, 243, 0.08) !important;
    padding-bottom: 12px !important;
}

/* Form row elements styling */
.woocommerce-account .woocommerce form .form-row {
    margin-bottom: 20px !important;
}

.woocommerce-account .woocommerce form .form-row label {
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    color: #374151 !important;
    margin-bottom: 6px !important;
    display: block !important;
}

.woocommerce-account .woocommerce form .form-row input.input-text {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    background: rgba(0, 0, 0, 0.01) !important;
    color: #111827 !important;
    font-size: 0.95rem !important;
    outline: none !important;
    transition: all 0.25s ease !important;
}

.woocommerce-account .woocommerce form .form-row input.input-text:focus {
    border-color: #3b71f3 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(59, 113, 243, 0.12) !important;
}

/* Button & Login submit overrides */
.woocommerce-account .woocommerce form .button,
.woocommerce-account .woocommerce button.button {
    background: linear-gradient(135deg, #3b71f3 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 15px rgba(59, 113, 243, 0.25) !important;
    display: inline-block !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 10px !important;
}

.woocommerce-account .woocommerce form .button:hover,
.woocommerce-account .woocommerce button.button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(59, 113, 243, 0.4) !important;
}

/* Remember me & lost password */
.woocommerce-account .woocommerce-form-login__rememberme {
    display: flex !important;
    align-items: center !important;
    font-size: 0.88rem !important;
    color: #4b5563 !important;
    margin-top: 10px !important;
    margin-bottom: 15px !important;
}

.woocommerce-account .woocommerce-form-login__rememberme input[type="checkbox"] {
    margin-right: 8px !important;
}

.woocommerce-account .woocommerce-LostPassword a {
    color: #3b71f3 !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.woocommerce-account .woocommerce-LostPassword a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* 2. Nextend Google Login Button Overrides */
.nsl-container {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 25px !important;
    width: 100% !important;
    max-width: 550px !important;
    margin: 0 auto 20px auto !important;
}

.nsl-container-google .nsl-button {
    width: 100% !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    font-family: inherit !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #ffffff !important;
}

.nsl-container-google .nsl-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08) !important;
    background: #fafafa !important;
}

/* 3. Login / Register Tab Switcher Elements styling */
.llms-login-tabs-wrapper {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 25px !important;
    width: 100% !important;
    max-width: 550px !important;
    margin: 0 auto 20px auto !important;
}

.llms-login-tab-btn {
    flex: 1 !important;
    text-align: center !important;
    padding: 12px 24px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    background: #ffffff !important;
    color: #4b5563 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02) !important;
}

.llms-login-tab-btn:hover {
    background: #fafafa !important;
    color: #111827 !important;
}

.llms-login-tab-btn.active {
    background: #3b71f3 !important;
    color: #ffffff !important;
    border-color: #3b71f3 !important;
    box-shadow: 0 4px 15px rgba(59, 113, 243, 0.25) !important;
}
}

/* 3. Logged-In Account Dashboard Layout */
@media (min-width: 769px) {
    .woocommerce-account .woocommerce {
        display: flex !important;
        gap: 35px !important;
        align-items: flex-start !important;
    }
    
    .woocommerce-MyAccount-navigation {
        flex: 0 0 280px !important;
        background: #ffffff !important;
        border: 1px solid rgba(0,0,0,0.06) !important;
        border-radius: 16px !important;
        padding: 20px 15px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.02) !important;
        position: sticky !important;
        top: 20px !important;
    }
    
    .woocommerce-MyAccount-content {
        flex: 1 !important;
        background: #ffffff !important;
        border: 1px solid rgba(0,0,0,0.06) !important;
        border-radius: 16px !important;
        padding: 35px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.02) !important;
        min-height: 500px !important;
    }

/* Sidebar Menu styling */
.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.woocommerce-MyAccount-navigation ul li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex !important;
    align-items: center !important;
    padding: 12px 18px !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    gap: 12px !important;
}

/* Active and Hover states */
.woocommerce-MyAccount-navigation ul li a:hover {
    background: rgba(59, 113, 243, 0.05) !important;
    color: #3b71f3 !important;
}

.woocommerce-MyAccount-navigation ul li a:hover::before {
    color: #3b71f3 !important;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li.active a {
    background: #3b71f3 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(59, 113, 243, 0.25) !important;
}

.woocommerce-MyAccount-navigation ul li.is-active a::before,
.woocommerce-MyAccount-navigation ul li.active a::before {
    color: #ffffff !important;
}
}

/* 4. Logged-In Account Navigation Icons (Applies to both Desktop and Mobile viewports) */
.woocommerce-MyAccount-navigation ul li a::before,
.woocommerce-MyAccount-navigation-link a::before {
    font-family: Dashicons !important;
    font-size: 1.15rem !important;
    color: #9ca3af !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    width: 20px !important;
    margin-right: 8px !important;
}

.woocommerce-MyAccount-navigation-link--dashboard a::before { content: "\f226" !important; color: #3b71f3 !important; }
.woocommerce-MyAccount-navigation-link--student-dashboard a::before { content: "\f310" !important; color: #7209b7 !important; }
.woocommerce-MyAccount-navigation-link--orders a::before { content: "\f174" !important; color: #f59e0b !important; }
.woocommerce-MyAccount-navigation-link--downloads a::before { content: "\f316" !important; color: #10b981 !important; }
.woocommerce-MyAccount-navigation-link--edit-address a::before { content: "\f102" !important; color: #ec4899 !important; }
.woocommerce-MyAccount-navigation-link--payment-methods a::before { content: "\f110" !important; color: #14b8a6 !important; }
.woocommerce-MyAccount-navigation-link--edit-account a::before { content: "\f110" !important; color: #3b82f6 !important; }
.woocommerce-MyAccount-navigation-link--seller-panel a::before { content: "\f511" !important; color: #f97316 !important; }
.woocommerce-MyAccount-navigation-link--instructor-portal a::before { content: "\f115" !important; color: #a855f7 !important; }
.woocommerce-MyAccount-navigation-link--admin-approvals a::before { content: "\f160" !important; color: #e11d48 !important; }
.woocommerce-MyAccount-navigation-link--store-management a::before { content: "\f239" !important; color: #14b8a6 !important; }
.woocommerce-MyAccount-navigation-link--customer-logout a::before { content: "\f110" !important; color: #ef4444 !important; }

/* 4. Inside Tab Content modern styling overrides */
.woocommerce-MyAccount-content p {
    color: #4b5563 !important;
    line-height: 1.6 !important;
    font-size: 0.98rem !important;
}

.woocommerce-MyAccount-content a.button {
    background: #3b71f3 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    display: inline-block !important;
    box-shadow: 0 4px 12px rgba(59, 113, 243, 0.15) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce-MyAccount-content a.button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(59, 113, 243, 0.25) !important;
    background: #1d4ed8 !important;
}
