/*
 * LIGHT MODE OVERRIDES
 * Active when body does NOT have .phideoshare-dark class
 * Dark mode is default; this file provides the light alternative
 */

/* ==========================================
   CSS VARIABLE OVERRIDES — LIGHT PALETTE
   ========================================== */
body:not(.phideoshare-dark) {
    --ps-bg: #f5f5f7;
    --ps-card: #ffffff;
    --ps-text: #374151;
    --ps-muted: rgba(0, 0, 0, 0.45);
    --ps-border: rgba(0, 0, 0, 0.08);
    --ps-red: #e8585d;
}

/* ==========================================
   BODY / GLOBAL
   ========================================== */
body:not(.phideoshare-dark) {
    background-color: #f5f5f7 !important;
    color: #374151;
}

/* ==========================================
   HEADER — light glassmorphism
   ========================================== */
body:not(.phideoshare-dark) .phideoshare-main-header {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06) !important;
}

body:not(.phideoshare-dark) .site-branding {
    color: #1f2937;
}

body:not(.phideoshare-dark) .site-title a {
    color: #1f2937;
    text-shadow: none;
}

body:not(.phideoshare-dark) .site-description {
    color: rgba(0, 0, 0, 0.55);
    text-shadow: none;
}

body:not(.phideoshare-dark) .phideoshare-button.header-button {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
    border-color: rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
}

body:not(.phideoshare-dark) .phideoshare-button.header-button:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

body:not(.phideoshare-dark) .phideoshare-button.header-button.logout {
    background: rgba(231, 76, 60, 0.08) !important;
    border-color: rgba(231, 76, 60, 0.25) !important;
    color: #c0392b !important;
}

body:not(.phideoshare-dark) .phideoshare-button.header-button.logout:hover {
    background: rgba(231, 76, 60, 0.15) !important;
    border-color: rgba(231, 76, 60, 0.4) !important;
}

body:not(.phideoshare-dark) .cart-icon-link {
    color: #374151;
}

/* ==========================================
   FOOTER — light
   ========================================== */
body:not(.phideoshare-dark) .site-footer {
    background: linear-gradient(135deg, #e8e8ec 0%, #f0f0f4 100%) !important;
    color: #374151;
}

body:not(.phideoshare-dark) .site-footer .footer-copyright {
    color: rgba(0, 0, 0, 0.7);
}

body:not(.phideoshare-dark) .site-footer .footer-links a {
    color: rgba(0, 0, 0, 0.6);
}

body:not(.phideoshare-dark) .site-footer .footer-links a:hover {
    color: #e8585d;
    background: rgba(232, 88, 93, 0.08);
}

body:not(.phideoshare-dark) .site-footer .footer-links .separator {
    color: rgba(0, 0, 0, 0.3);
}

/* ==========================================
   WELCOME / LOGIN / REGISTER CARDS
   ========================================== */
body:not(.phideoshare-dark) .phideoshare-welcome,
body:not(.phideoshare-dark) .login-box {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

body:not(.phideoshare-dark) .phideoshare-welcome h1,
body:not(.phideoshare-dark) .login-logo h2 {
    color: #1f2937;
}

body:not(.phideoshare-dark) .phideoshare-welcome p {
    color: rgba(0, 0, 0, 0.5);
}

body:not(.phideoshare-dark) .phideoshare-login-form input[type="text"],
body:not(.phideoshare-dark) .phideoshare-login-form input[type="password"],
body:not(.phideoshare-dark) #registration-form input[type="text"],
body:not(.phideoshare-dark) #registration-form input[type="email"] {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.12);
    color: #374151;
}

body:not(.phideoshare-dark) .phideoshare-login-form input[type="text"]:focus,
body:not(.phideoshare-dark) .phideoshare-login-form input[type="password"]:focus,
body:not(.phideoshare-dark) #registration-form input[type="text"]:focus,
body:not(.phideoshare-dark) #registration-form input[type="email"]:focus {
    border-color: #e8585d;
    background: #ffffff;
}

body:not(.phideoshare-dark) .phideoshare-login-form input[type="text"]::placeholder,
body:not(.phideoshare-dark) .phideoshare-login-form input[type="password"]::placeholder,
body:not(.phideoshare-dark) #registration-form input[type="text"]::placeholder,
body:not(.phideoshare-dark) #registration-form input[type="email"]::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

body:not(.phideoshare-dark) #registration-form label {
    color: #374151;
}

body:not(.phideoshare-dark) #reg_passmail {
    color: rgba(0, 0, 0, 0.5);
}

body:not(.phideoshare-dark) .login-links a {
    color: #e8585d;
}

/* ==========================================
   DASHBOARD + UPLOAD — light glassmorphism
   Background image is inherited from body (global).
   ========================================== */

body:not(.phideoshare-dark).page-template-page-dashboard-php .phideoshare-user-profile,
body:not(.phideoshare-dark).page-template-page-dashboard-php .phideoshare-user-profile .profile-header,
body:not(.phideoshare-dark).page-template-page-dashboard-php .phideoshare-user-profile .stat-box,
body:not(.phideoshare-dark).page-template-page-dashboard-php .phideoshare-user-profile .upgrade-options,
body:not(.phideoshare-dark).page-template-page-dashboard-php .dashboard-section,
body:not(.phideoshare-dark).page-template-page-dashboard-php .phideoshare-my-uploads,
body:not(.phideoshare-dark).page-template-page-upload-php .phideoshare-user-profile,
body:not(.phideoshare-dark).page-template-page-upload-php .phideoshare-user-profile .profile-header,
body:not(.phideoshare-dark).page-template-page-upload-php .phideoshare-user-profile .stat-box,
body:not(.phideoshare-dark).page-template-page-upload-php .phideoshare-user-profile .upgrade-options,
body:not(.phideoshare-dark).page-template-page-upload-php .phideoshare-card {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06) !important;
}

body:not(.phideoshare-dark) .dashboard-section {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06) !important;
}

/* Dashboard header / welcome */
body:not(.phideoshare-dark) .phideoshare-dashboard-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body:not(.phideoshare-dark) .phideoshare-welcome-message h2 {
    color: #1f2937;
}

body:not(.phideoshare-dark) .phideoshare-welcome-message p {
    color: rgba(0, 0, 0, 0.5);
}

body:not(.phideoshare-dark) .phideoshare-page-header h1 {
    color: #1f2937;
    text-shadow: none;
}

body:not(.phideoshare-dark) .phideoshare-page-header {
    border-bottom-color: rgba(232, 88, 93, 0.1);
}

/* Dashboard section headings */
body:not(.phideoshare-dark) .dashboard-section h2 {
    color: #1f2937;
}

/* Action cards */
body:not(.phideoshare-dark) .action-card {
    background: linear-gradient(135deg, rgba(232, 88, 93, 0.03) 0%, rgba(232, 88, 93, 0.01) 100%);
    border-color: rgba(0, 0, 0, 0.06);
}

body:not(.phideoshare-dark) .action-card h3 {
    color: #1f2937;
}

body:not(.phideoshare-dark) .action-card p {
    color: rgba(0, 0, 0, 0.5);
}

/* Secondary button */
body:not(.phideoshare-dark) .phideoshare-button-secondary {
    background-color: rgba(0, 0, 0, 0.04);
    color: #374151;
    border-color: rgba(0, 0, 0, 0.1);
}

body:not(.phideoshare-dark) .phideoshare-button-secondary:hover {
    border-color: rgba(0, 0, 0, 0.2);
    color: #1f2937;
    background-color: rgba(0, 0, 0, 0.08);
}

/* ==========================================
   UPLOADS TABLE
   ========================================== */
body:not(.phideoshare-dark) .phideoshare-my-uploads h2 {
    color: #1f2937;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body:not(.phideoshare-dark) .phideoshare-uploads-table th {
    background-color: rgba(0, 0, 0, 0.03);
    color: #374151;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body:not(.phideoshare-dark) .phideoshare-uploads-table td {
    border-bottom-color: rgba(0, 0, 0, 0.05);
    color: #374151;
}

/* ==========================================
   ACCOUNT PAGE
   ========================================== */
body:not(.phideoshare-dark) .account-section {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

body:not(.phideoshare-dark) .account-section h2 {
    color: #1f2937;
    border-bottom-color: rgba(232, 88, 93, 0.1);
}

body:not(.phideoshare-dark) .form-group label {
    color: #374151;
}

body:not(.phideoshare-dark) .form-group input[type="text"],
body:not(.phideoshare-dark) .form-group input[type="email"],
body:not(.phideoshare-dark) .form-group input[type="password"] {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.1);
    color: #374151;
}

body:not(.phideoshare-dark) .form-group input[type="text"]:focus,
body:not(.phideoshare-dark) .form-group input[type="email"]:focus,
body:not(.phideoshare-dark) .form-group input[type="password"]:focus {
    background: #ffffff;
    border-color: rgba(232, 88, 93, 0.5);
}

body:not(.phideoshare-dark) .form-actions {
    border-top-color: rgba(0, 0, 0, 0.08);
}

body:not(.phideoshare-dark) .profile-image-section {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

body:not(.phideoshare-dark) .profile-preview {
    border-color: rgba(232, 88, 93, 0.15);
    background: #f0f0f4;
}

/* ==========================================
   DOWNLOAD PAGE
   ========================================== */
body:not(.phideoshare-dark) .phideoshare-download-box {
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* ==========================================
   PAGE INTRO
   ========================================== */
body:not(.phideoshare-dark) .page-intro {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body:not(.phideoshare-dark) .page-intro p {
    color: rgba(0, 0, 0, 0.5);
}

/* ==========================================
   NOTICES
   ========================================== */
body:not(.phideoshare-dark) .phideoshare-notice.notice-info {
    background: rgba(232, 88, 93, 0.06);
}

body:not(.phideoshare-dark) .phideoshare-notice.notice-warning {
    background: rgba(255, 193, 7, 0.06);
}

/* ==========================================
   REGISTRATION SUCCESS
   ========================================== */
body:not(.phideoshare-dark) .next-steps {
    background: rgba(232, 88, 93, 0.03);
}

body:not(.phideoshare-dark) .next-steps h3 {
    color: #1f2937;
}

body:not(.phideoshare-dark) .next-steps ol {
    color: rgba(0, 0, 0, 0.5);
}

/* ==========================================
   WOOCOMMERCE CHECKOUT (inline styles in functions.php)
   ========================================== */
body:not(.phideoshare-dark) #business_toggle_field {
    background: #f9fafb !important;
    border-left-color: #e8585d !important;
}

body:not(.phideoshare-dark) #business_toggle_field label {
    color: #374151 !important;
}

body:not(.phideoshare-dark) #business_fields {
    background: #f9fafb !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body:not(.phideoshare-dark) #business_fields label {
    color: rgba(0, 0, 0, 0.5) !important;
}

body:not(.phideoshare-dark) #business_fields input {
    border-color: rgba(0, 0, 0, 0.12) !important;
    background: #ffffff !important;
    color: #374151 !important;
}

/* ==========================================
   THEME TOGGLE BUTTON
   ========================================== */
.theme-toggle {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.theme-toggle .icon-sun {
    display: none;
    color: #f59e0b;
}

.theme-toggle .icon-moon {
    display: block;
    color: #d1d5db;
}

/* Light mode: show sun, hide moon */
body:not(.phideoshare-dark) .theme-toggle {
    border-color: rgba(0, 0, 0, 0.12);
}

body:not(.phideoshare-dark) .theme-toggle:hover {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.05);
}

body:not(.phideoshare-dark) .theme-toggle .icon-sun {
    display: block;
}

body:not(.phideoshare-dark) .theme-toggle .icon-moon {
    display: none;
}

/* ==========================================
   SCROLLBAR — light
   ========================================== */
body:not(.phideoshare-dark) ::-webkit-scrollbar {
    width: 8px;
}

body:not(.phideoshare-dark) ::-webkit-scrollbar-track {
    background: #f0f0f4;
}

body:not(.phideoshare-dark) ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

body:not(.phideoshare-dark) ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ==========================================
   PLUGIN CSS OVERRIDES
   The plugin adds styles under body.phideoshare-dark.
   When that class is removed, those styles stop applying.
   Below we override any remaining hardcoded dark values
   from the plugin's CSS that leak through.
   ========================================== */
body:not(.phideoshare-dark) .phideoshare-user-profile {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}

body:not(.phideoshare-dark) .phideoshare-user-profile .profile-header {
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

body:not(.phideoshare-dark) .phideoshare-user-profile .stat-box {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}

body:not(.phideoshare-dark) .stat-label {
    color: rgba(0, 0, 0, 0.5) !important;
}

body:not(.phideoshare-dark) .stat-value {
    color: #e8585d !important;
}

/* Generic text color overrides for plugin elements */
body:not(.phideoshare-dark) h1,
body:not(.phideoshare-dark) h2,
body:not(.phideoshare-dark) h3,
body:not(.phideoshare-dark) h4 {
    color: #1f2937;
}

body:not(.phideoshare-dark) p {
    color: #374151;
}

body:not(.phideoshare-dark) a:not(.phideoshare-button) {
    color: #e8585d;
}

/* ==========================================
   PLUGIN —ps-input OVERRIDES (upload message, FTP, etc.)
   The plugin uses var(--ps-input) = #0e1119 for many dark backgrounds.
   Override at the CSS variable level for light mode.
   ========================================== */
body:not(.phideoshare-dark) {
    --ps-input: #f3f4f6;
    --ps-faint: rgba(0, 0, 0, 0.06);
}

/* Upload message bar — light background */
body:not(.phideoshare-dark) .upload-message,
body:not(.phideoshare-dark) .phideoshare-upload-item .upload-message {
    background: #f3f4f6 !important;
    color: #374151 !important;
}

body:not(.phideoshare-dark) .upload-message p,
body:not(.phideoshare-dark) .phideoshare-upload-item .upload-message p {
    color: rgba(0, 0, 0, 0.55) !important;
}

/* Pagination buttons — light */
body:not(.phideoshare-dark) .phideoshare-pagination-btn {
    background: #f3f4f6 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #e8585d !important;
}

body:not(.phideoshare-dark) .phideoshare-pagination-btn:hover {
    background: rgba(232, 88, 93, 0.08) !important;
    border-color: #e8585d !important;
}

body:not(.phideoshare-dark) .phideoshare-pagination-info {
    color: rgba(0, 0, 0, 0.45) !important;
}

/* ==========================================
   WOOCOMMERCE CART — light overrides
   ========================================== */
body:not(.phideoshare-dark) .phideoshare-cart-container .cart-header h1,
body:not(.phideoshare-dark) .cart-totals h2 {
    color: #1f2937;
}

body:not(.phideoshare-dark) .cart-item {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(0, 0, 0, 0.06);
}

body:not(.phideoshare-dark) .item-name,
body:not(.phideoshare-dark) .item-name a {
    color: #1f2937 !important;
}

body:not(.phideoshare-dark) .cart-totals {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-color: rgba(0, 0, 0, 0.06);
}

body:not(.phideoshare-dark) .cart-empty {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

body:not(.phideoshare-dark) .cart-empty h2 {
    color: #1f2937;
}

body:not(.phideoshare-dark) .cart-empty p {
    color: rgba(0, 0, 0, 0.5);
}

body:not(.phideoshare-dark) .subtotal-row,
body:not(.phideoshare-dark) .total-row,
body:not(.phideoshare-dark) .tax-row,
body:not(.phideoshare-dark) .fee-row,
body:not(.phideoshare-dark) .coupon-row,
body:not(.phideoshare-dark) .shipping-row {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

body:not(.phideoshare-dark) .total-label,
body:not(.phideoshare-dark) .total-value,
body:not(.phideoshare-dark) .subtotal-label,
body:not(.phideoshare-dark) .subtotal-value {
    color: #1f2937;
}

body:not(.phideoshare-dark) .phideoshare-cart-container .cart-header p {
    color: rgba(0, 0, 0, 0.5);
}

/* ==========================================
   WOOCOMMERCE CHECKOUT — light glassmorphism
   ========================================== */
body:not(.phideoshare-dark) .phideoshare-checkout-container {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

body:not(.phideoshare-dark) .phideoshare-checkout-container .woocommerce {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

body:not(.phideoshare-dark) .woocommerce-checkout,
body:not(.phideoshare-dark) form.woocommerce-checkout {
    background: transparent !important;
}

body:not(.phideoshare-dark) .woocommerce-checkout h2,
body:not(.phideoshare-dark) .woocommerce-checkout h3 {
    color: #1f2937;
}

body:not(.phideoshare-dark) .woocommerce form .form-row label {
    color: #374151;
}

body:not(.phideoshare-dark) .woocommerce form .form-row input.input-text,
body:not(.phideoshare-dark) .woocommerce form .form-row select,
body:not(.phideoshare-dark) .woocommerce form .form-row textarea {
    background: rgba(249, 250, 251, 0.7);
    border-color: rgba(0, 0, 0, 0.12);
    color: #374151;
}

body:not(.phideoshare-dark) .woocommerce-checkout-review-order-table {
    background: rgba(249, 250, 251, 0.5);
}

body:not(.phideoshare-dark) .woocommerce-checkout-review-order-table th,
body:not(.phideoshare-dark) .woocommerce-checkout-review-order-table td {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    color: #374151;
}

body:not(.phideoshare-dark) .woocommerce-checkout #payment {
    background: rgba(249, 250, 251, 0.5);
}

body:not(.phideoshare-dark) .woocommerce-checkout #payment .payment_method {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
}

body:not(.phideoshare-dark) .woocommerce-checkout #payment .payment_method label {
    color: #374151;
}

/* ==========================================
   .phideoshare-button.secondary — light override
   ========================================== */
body:not(.phideoshare-dark) .phideoshare-button.secondary {
    background: rgba(232, 88, 93, 0.06);
    color: #c0392b;
    border-color: rgba(232, 88, 93, 0.2);
}

body:not(.phideoshare-dark) .phideoshare-button.secondary:hover {
    background: rgba(232, 88, 93, 0.12);
    border-color: rgba(232, 88, 93, 0.4);
    color: #e8585d;
}
