/**
 * Elementor Integration Styles for Yangebup Knights Registration Form
 * Uses Elementor global CSS variables for consistent theming
 */

/* Registration Header - Using Elementor Primary Color */
.yangebup-registration-wrapper .yangebup-registration-header {
    background: var(--e-global-color-primary, #000000);
    color: white;
    border-radius: 0;
    padding: 30px;
    margin-bottom: 40px;
}

.yangebup-registration-wrapper .yangebup-registration-header h2 {
    color: white;
    font-family: var(--e-global-typography-primary-font-family, "Inter Tight"), sans-serif;
    font-size: var(--e-global-typography-primary-font-size, 52px);
    font-weight: var(--e-global-typography-primary-font-weight, 600);
    line-height: var(--e-global-typography-primary-line-height, 48px);
    margin: 0 0 15px 0;
}

.yangebup-registration-wrapper .yangebup-season-info {
    color: var(--e-global-color-secondary, #FFCB05);
    font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
}

/* Form Sections */
.yangebup-registration-wrapper .yangebup-form-section {
    background: white;
    border: 1px solid var(--e-global-color-accent, #C4C3BD);
    border-radius: 0;
    padding: 30px;
    margin-bottom: 30px;
}

.yangebup-registration-wrapper .yangebup-form-section h3 {
    color: var(--e-global-color-primary, #000000);
    font-family: var(--e-global-typography-secondary-font-family, "Inter Tight"), sans-serif;
    font-size: var(--e-global-typography-secondary-font-size, 36px);
    font-weight: var(--e-global-typography-secondary-font-weight, 500);
    line-height: var(--e-global-typography-secondary-line-height, 48px);
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--e-global-color-secondary, #FFCB05);
}

/* Form Labels */
.yangebup-registration-wrapper .yangebup-form-group label {
    color: var(--e-global-color-text, #000000);
    font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
    font-size: var(--e-global-typography-text-font-size, 15px);
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

/* Form Fields */
.yangebup-registration-wrapper .yangebup-form-group input,
.yangebup-registration-wrapper .yangebup-form-group select,
.yangebup-registration-wrapper .yangebup-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--e-global-color-primary, #000000);
    border-radius: 0;
    background: white;
    color: var(--e-global-color-text, #000000);
    font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
    font-size: var(--e-global-typography-text-font-size, 15px);
    transition: all 0.3s ease;
}

.yangebup-registration-wrapper .yangebup-form-group input:focus,
.yangebup-registration-wrapper .yangebup-form-group select:focus,
.yangebup-registration-wrapper .yangebup-form-group textarea:focus {
    outline: none;
    border-color: var(--e-global-color-secondary, #FFCB05);
    box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.15);
}

/* Checkboxes and Radio Buttons */
.yangebup-registration-wrapper input[type="checkbox"],
.yangebup-registration-wrapper input[type="radio"] {
    width: auto !important;
    margin-right: 8px;
    accent-color: var(--e-global-color-secondary, #FFCB05);
}

/* Help Text */
.yangebup-registration-wrapper .yangebup-help-text {
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin-top: 5px;
    font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
}

/* Submit Button - Using Elementor Secondary Color */
.yangebup-registration-wrapper .yangebup-submit-btn {
    background: var(--e-global-color-secondary, #FFCB05);
    color: var(--e-global-color-primary, #000000);
    border: none;
    border-radius: 0;
    padding: 20px 60px;
    font-family: var(--e-global-typography-accent-font-family, "Helvetica"), sans-serif;
    font-size: var(--e-global-typography-accent-font-size, 16px);
    font-weight: var(--e-global-typography-accent-font-weight, 500);
    text-transform: var(--e-global-typography-accent-text-transform, uppercase);
    letter-spacing: var(--e-global-typography-accent-letter-spacing, 1.2px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.yangebup-registration-wrapper .yangebup-submit-btn:hover {
    background: var(--e-global-color-accent, #C4C3BD);
    color: var(--e-global-color-primary, #000000);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.yangebup-registration-wrapper .yangebup-submit-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

/* Price Display */
.yangebup-registration-wrapper .yangebup-price-display {
    background: var(--e-global-color-accent, #C4C3BD);
    border: 1px solid var(--e-global-color-primary, #000000);
    border-radius: 0;
    padding: 20px;
    margin: 20px 0;
}

.yangebup-registration-wrapper .yangebup-price-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
}

.yangebup-registration-wrapper .yangebup-price-row:last-child {
    border-bottom: none;
}

.yangebup-registration-wrapper .yangebup-price-row .yangebup-price-amount,
.yangebup-registration-wrapper .yangebup-price-row .price-amount {
    text-align: right;
    min-width: 100px;
    color: var(--e-global-color-primary, #000000);
    font-weight: 500;
}

.yangebup-registration-wrapper .yangebup-total-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--e-global-color-primary, #000000);
    font-family: var(--e-global-typography-primary-font-family, "Inter Tight"), sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.yangebup-registration-wrapper .yangebup-total-price .yangebup-price-value {
    color: var(--e-global-color-primary, #000000);
    text-align: right;
}

/* Messages */
.yangebup-registration-wrapper .yangebup-message {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0;
    font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
}

.yangebup-registration-wrapper .yangebup-message.success {
    background: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

.yangebup-registration-wrapper .yangebup-message.error {
    background: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

.yangebup-registration-wrapper .yangebup-message.info {
    background: #d1ecf1;
    border: 1px solid #17a2b8;
    color: #0c5460;
}

/* Loading Spinner */
.yangebup-registration-wrapper .yangebup-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--e-global-color-secondary, #FFCB05);
    border-radius: 50%;
    animation: yangebup-spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes yangebup-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .yangebup-registration-wrapper .yangebup-registration-header h2 {
        font-size: var(--e-global-typography-primary-font-size, 46px);
        line-height: var(--e-global-typography-primary-line-height, 1em);
    }
    
    .yangebup-registration-wrapper .yangebup-form-section h3 {
        font-size: var(--e-global-typography-secondary-font-size, 34px);
        line-height: var(--e-global-typography-secondary-line-height, 38px);
    }
}

@media (max-width: 767px) {
    .yangebup-registration-wrapper {
        padding: 15px;
    }
    
    .yangebup-registration-wrapper .yangebup-registration-header {
        padding: 20px;
    }
    
    .yangebup-registration-wrapper .yangebup-registration-header h2 {
        font-size: var(--e-global-typography-primary-font-size, 38px);
    }
    
    .yangebup-registration-wrapper .yangebup-form-section {
        padding: 20px;
    }
    
    .yangebup-registration-wrapper .yangebup-form-section h3 {
        font-size: var(--e-global-typography-secondary-font-size, 32px);
        line-height: var(--e-global-typography-secondary-line-height, 36px);
    }
    
    .yangebup-registration-wrapper .yangebup-submit-btn {
        width: 100%;
        padding: 15px 30px;
    }
}

/* Payment Options Price Display */
.yangebup-registration-wrapper .yangebup-payment-option .price,
.yangebup-registration-wrapper .yangebup-radio-label .price {
    display: inline-block;
    text-align: right;
    color: var(--e-global-color-primary, #000000) !important;
    font-weight: 600;
    font-size: 18px;
    margin-left: 10px;
}

.yangebup-registration-wrapper .yangebup-payment-option label,
.yangebup-registration-wrapper .yangebup-radio-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.yangebup-registration-wrapper .yangebup-payment-option .payment-label-text {
    flex-grow: 1;
}

/* Age Group Badges - Using Elementor Colors */
.yangebup-registration-wrapper .yangebup-age-group-badge {
    display: inline-block;
    padding: 5px 15px;
    background: var(--e-global-color-secondary, #FFCB05);
    color: var(--e-global-color-primary, #000000);
    font-size: 14px;
    font-weight: 500;
    margin: 5px 0;
    font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
}

/* Required Field Indicator */
.yangebup-registration-wrapper .yangebup-form-group label .required {
    color: var(--e-global-color-secondary, #FFCB05);
    font-weight: bold;
    margin-left: 3px;
}

/* Progress Indicator */
.yangebup-registration-wrapper .yangebup-progress-bar {
    height: 4px;
    background: var(--e-global-color-accent, #C4C3BD);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 30px;
}

.yangebup-registration-wrapper .yangebup-progress-fill {
    height: 100%;
    background: var(--e-global-color-secondary, #FFCB05);
    transition: width 0.3s ease;
}

/* Error States */
.yangebup-registration-wrapper .yangebup-field-error {
    border-color: #dc3545 !important;
    background: #fff5f5 !important;
}

.yangebup-registration-wrapper .yangebup-error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
}

/* Inherit Elementor Kit Styles */
.elementor-kit-8 .yangebup-registration-wrapper {
    color: var(--e-global-color-text);
    font-family: var(--e-global-typography-text-font-family), sans-serif;
    font-size: var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    line-height: var(--e-global-typography-text-line-height);
}

/* ========================================
   WooCommerce My Account Navigation Fix
   Fixes yellow box issue on Dashboard
   ======================================== */

/* Fix the active navigation item background */
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--dashboard.is-active a {
    background-color: transparent !important;
    border-left: 4px solid var(--e-global-color-secondary, #FFCB05) !important;
    border-color: var(--e-global-color-primary, #000000) !important;
    color: var(--e-global-color-primary, #000000) !important;
    font-weight: 600 !important;
}

/* Hover state for navigation items */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background-color: #f8f9fa !important;
    border-left: 4px solid var(--e-global-color-secondary, #FFCB05) !important;
    color: var(--e-global-color-primary, #000000) !important;
}

/* Normal state for navigation items */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    background-color: white !important;
    border: 1px solid #e0e0e0 !important;
    border-left: 4px solid transparent !important;
    color: var(--e-global-color-text, #000000) !important;
    transition: all 0.3s ease !important;
}

/* Alternative styling with accent color */
.elementor-kit-8 .woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background-color: var(--e-global-color-accent, #C4C3BD) !important;
    border-color: var(--e-global-color-secondary, #FFCB05) !important;
    border-left-width: 4px !important;
    color: var(--e-global-color-primary, #000000) !important;
}

/* Remove any box shadow that might appear */
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    box-shadow: none !important;
}

/* Ensure consistent font family and remove underlines */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif !important;
    text-decoration: none !important;
}

/* ========================================
   WooCommerce Messages & Alerts Styling
   Override default blue borders
   ======================================== */

/* Override WooCommerce info messages to use Elementor colors */
.woocommerce-account .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-info {
    border-left-color: var(--e-global-color-secondary, #FFCB05) !important;
    background: #fffdf5 !important;
}

.woocommerce-account .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-message {
    border-left-color: var(--e-global-color-secondary, #FFCB05) !important;
    background: #fffdf5 !important;
}

.woocommerce-account .woocommerce-error,
.woocommerce-MyAccount-content .woocommerce-error {
    border-left-color: #dc3545 !important;
    background: #fff5f5 !important;
}

/* Override WooCommerce CSS variables */
.woocommerce-account {
    --wp-admin-theme-color: var(--e-global-color-secondary, #FFCB05);
    --wp-admin-theme-color-darker-10: var(--e-global-color-primary, #000000);
}