/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* ==========================================================================
   Modern MemberPress Checkout Styles
   ========================================================================== */

:root {
    --primary-color: #245f51;
    --primary-hover: #245f51;
    --secondary-color: #307c6a;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --border-focus: #245f51;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.2s ease-in-out;
}

/* Modern Checkout Wrapper */
.modern-checkout-wrapper {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 2rem 1rem;
   
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.modern-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
.checkout-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(135deg, #245f51 0%, #245f51 100%);
    color: white;
}

.checkout-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.checkout-subtitle {
    font-size: 1.125rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
}

/* Progress Indicator */
.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: var(--bg-secondary);
    gap: 2rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: var(--transition);
}

.progress-step.active {
    opacity: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.step-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Form Layout */
.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    padding: 0;
}

.checkout-left {
    padding: 2rem;
}

.checkout-right {
    background: var(--bg-secondary);
    padding: 2rem;
    border-left: 1px solid var(--border-color);
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.section-icon {
    font-size: 1.25rem;
}

/* Form Fields */
.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-field-modern {
    margin-bottom: 1.5rem;
    position: relative;
}

.modern-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.modern-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
    box-sizing: border-box;
}

.modern-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-input.error {
    border-color: var(--error-color);
}

.modern-input::placeholder {
    color: var(--text-secondary);
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* Error Messages */
.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.form-field-modern.error .error-message,
.mepr-field-required.error .error-message {
    opacity: 1;
}

.success-message {
    display: block;
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.success-message.show {
    opacity: 1;
}

/* Modern Error Message */
.modern-error-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.error-icon {
    font-size: 1.5rem;
}

.error-text {
    color: var(--error-color);
    font-weight: 500;
}

/* Coupon Section */
.coupon-section {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: var(--bg-secondary);
}

.modern-coupon-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.modern-coupon-toggle:hover {
    color: var(--primary-hover);
}

.coupon-icon {
    font-size: 1.125rem;
}

.coupon-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.coupon-input-wrapper .modern-input {
    flex: 1;
}

.apply-coupon-btn {
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.apply-coupon-btn:hover {
    background: var(--primary-hover);
}

.coupon-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Payment Methods */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-method-option {
    position: relative;
}

.payment-method-label {
    display: block;
    cursor: pointer;
}

.payment-method-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-method-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    transition: var(--transition);
}

.payment-method-label input[type="radio"]:checked + .payment-method-content {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.payment-method-icon img {
    max-width: 40px;
    height: auto;
}

.payment-method-name {
    font-weight: 500;
    color: var(--text-primary);
}

.single-payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-color);
}

/* Terms of Service */
.tos-section {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: var(--transition);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

.tos-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tos-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.tos-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.submit-section {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modern-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.modern-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modern-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Order Summary */
.order-summary {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 2rem;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.item-details {
    margin-bottom: 0.5rem;
}

.item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.item-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.item-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Security Features */
.security-features {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.security-item:last-child {
    margin-bottom: 0;
}

.security-icon {
    font-size: 1rem;
}

.security-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Benefits List */
.benefits-list {
    margin-top: 1.5rem;
}

.benefits-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 0;
}

/* Utilities */
.hidden {
    display: none !important;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-checkout-wrapper {
        padding: 1rem;
    }
    
    .checkout-header {
        padding: 2rem 1rem 1.5rem;
    }
    
    .checkout-title {
        font-size: 2rem;
    }
    
    .checkout-subtitle {
        font-size: 1rem;
    }
    
    .checkout-progress {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .checkout-left {
        padding: 1.5rem;
    }
    
    .checkout-right {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding: 1.5rem;
    }
    
    .form-row-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .coupon-input-wrapper {
        flex-direction: column;
    }
    
    .payment-methods-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
}

@media (max-width: 480px) {
    .checkout-title {
        font-size: 1.75rem;
    }
    
    .checkout-left,
    .checkout-right {
        padding: 1rem;
    }
    
    .progress-step {
        gap: 0.25rem;
    }
    
    .step-label {
        display: none;
    }
}

/* MemberPress Specific Overrides */
.mepr-form .mp-form-row {
    margin-bottom: 0 !important;
}

.mepr-form input[type="text"],
.mepr-form input[type="email"],
.mepr-form input[type="password"],
.mepr-form select,
.mepr-form textarea {
    border: 2px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    padding: 0.875rem 1rem !important;
    font-size: 1rem !important;
    transition: var(--transition) !important;
}

.mepr-form input[type="text"]:focus,
.mepr-form input[type="email"]:focus,
.mepr-form input[type="password"]:focus,
.mepr-form select:focus,
.mepr-form textarea:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

/* Payment form styling */
#mepr-payment-methods-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

#mepr-payment-methods-panel .mp-form-row {
    margin-bottom: 1rem !important;
}

#mepr-payment-methods-panel label {
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

/* Custom field styling */
.mepr-custom-field {
    margin-bottom: 1.5rem !important;
}

.mepr-custom-field label {
    display: block !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.875rem !important;
}

/* ==========================================================================
   ReadyLaunch Specific Styles
   ========================================================================== */

.modern-readylaunch .checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    padding: 0;
}

.modern-readylaunch .form-wrapper {
    padding: 2rem;
}

.modern-readylaunch .invoice-wrapper {
    background: var(--bg-secondary);
    padding: 2rem;
    border-left: 1px solid var(--border-color);
}

/* Address fields styling */
.address-fields-wrapper {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.address-fields-wrapper .mp-form-row {
    margin-bottom: 0 !important;
}

.address-fields-wrapper .mp-form-label {
    margin-bottom: 0.5rem;
}

.address-fields-wrapper .mp-form-label label {
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    font-size: 0.875rem !important;
}

.address-fields-wrapper input,
.address-fields-wrapper select {
    width: 100% !important;
    padding: 0.875rem 1rem !important;
    border: 2px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    font-size: 1rem !important;
    transition: var(--transition) !important;
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    box-sizing: border-box !important;
}

.address-fields-wrapper input:focus,
.address-fields-wrapper select:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

/* Form subsections */
.form-subsection {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.subsection-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Custom fields wrapper */
.custom-fields-wrapper {
    margin: 1.5rem 0;
}

.custom-fields-wrapper .mp-form-row {
    margin-bottom: 1.5rem !important;
}

.custom-fields-wrapper .mp-form-label {
    margin-bottom: 0.5rem !important;
}

.custom-fields-wrapper .mp-form-label label {
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    font-size: 0.875rem !important;
}

.custom-fields-wrapper input,
.custom-fields-wrapper select,
.custom-fields-wrapper textarea {
    width: 100% !important;
    padding: 0.875rem 1rem !important;
    border: 2px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    font-size: 1rem !important;
    transition: var(--transition) !important;
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    box-sizing: border-box !important;
}

.custom-fields-wrapper input:focus,
.custom-fields-wrapper select:focus,
.custom-fields-wrapper textarea:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

/* Payment methods in ReadyLaunch */
.modern-readylaunch .mepr-payment-methods-wrapper {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

.modern-readylaunch .mepr-payment-methods-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.modern-readylaunch .mepr-payment-methods-icons img {
    max-height: 30px;
    width: auto;
}

.modern-readylaunch .mepr-payment-methods-radios {
    margin-bottom: 1.5rem;
}

.modern-readylaunch .mepr-payment-methods-radios label {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
    background: var(--bg-primary) !important;
    border: 2px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    margin-bottom: 0.5rem !important;
}

.modern-readylaunch .mepr-payment-methods-radios label:hover {
    border-color: var(--primary-color) !important;
}

.modern-readylaunch .mepr-payment-methods-radios input[type="radio"]:checked + span {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

.modern-readylaunch .mepr-payment-methods-radios input[type="radio"]:checked {
    accent-color: var(--primary-color) !important;
}

.modern-readylaunch .payment-methods-descriptions {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 1rem;
}

/* Privacy and TOS sections */
.privacy-section {
    margin-top: 1rem;
}

/* ReadyLaunch coupon in sidebar */
.modern-readylaunch .coupon-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

/* ReadyLaunch responsive */
@media (max-width: 768px) {
    .modern-readylaunch .checkout-content {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .modern-readylaunch .form-wrapper {
        padding: 1.5rem;
    }
    
    .modern-readylaunch .invoice-wrapper {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding: 1.5rem;
    }
    
    .form-row-group {
        grid-template-columns: 1fr;
    }
    
    .address-fields-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .modern-readylaunch .form-wrapper,
    .modern-readylaunch .invoice-wrapper {
        padding: 1rem;
    }
    
    .form-subsection {
        padding: 1rem;
    }
}
