/**
 * LifeSeasons Refund Request Styles
 */

/* Page title and full width styles */

/* Step-based styles for different refund process steps */

/* Hide page titles for all refund steps */
.ls-refund-page-step1 .entry-title,
.ls-refund-page-step1 .page-header .entry-title,
.ls-refund-page-step1 .wp-block-post-title,
.ls-refund-page-step2 .entry-title,
.ls-refund-page-step2 .page-header .entry-title,
.ls-refund-page-step2 .wp-block-post-title,
.ls-refund-page-step3 .entry-title,
.ls-refund-page-step3 .page-header .entry-title,
.ls-refund-page-step3 .wp-block-post-title,
.ls-refund-page .entry-title,
.ls-refund-page .page-header .entry-title,
.ls-refund-page .wp-block-post-title {
    display: none !important;
}

/* Step 1: Full-width layout for split-screen (lookup form with image) */
.ls-refund-page-step1 .site-main,
.ls-refund-page-step1 #primary,
.ls-refund-page-step1 .content-area,
.ls-refund-page-step1 .wp-block-group,
.ls-refund-page-step1 main,
.ls-refund-page-step1 .wp-block-post-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Step 2: Centered, constrained layout for product selection */
.ls-refund-page-step2 .site-main,
.ls-refund-page-step2 #primary,
.ls-refund-page-step2 .content-area,
.ls-refund-page-step2 .wp-block-group,
.ls-refund-page-step2 main,
.ls-refund-page-step2 .wp-block-post-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: auto !important;
}

/* Step 3: Centered, constrained layout for confirmation */
.ls-refund-page-step3 .site-main,
.ls-refund-page-step3 #primary,
.ls-refund-page-step3 .content-area,
.ls-refund-page-step3 .wp-block-group,
.ls-refund-page-step3 main,
.ls-refund-page-step3 .wp-block-post-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: auto !important;
}

/* Fallback: Keep original behavior for generic class */
.ls-refund-page .site-main,
.ls-refund-page #primary,
.ls-refund-page .content-area,
.ls-refund-page .wp-block-group,
.ls-refund-page main,
.ls-refund-page .wp-block-post-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Step 1: Split-screen container (lookup form with image) */
.ls-refund-page-step1 .ls-refund-page-container {
    display: flex;
    width: 100%;
    min-height: 100vh; /* Full viewport height to push footer below the fold */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ls-refund-page-step1 .ls-refund-form-side {
    width: 30%;
    padding: 40px;
    box-sizing: border-box;
}

/* Step 2: Single column container (product selection) */
.ls-refund-page-step2 .ls-refund-page-container {
    display: block;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ls-refund-page-step2 .ls-refund-form-side {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

/* Step 3: Single column container (confirmation) */
.ls-refund-page-step3 .ls-refund-page-container {
    display: block;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ls-refund-page-step3 .ls-refund-form-side {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

/* Fallback: Original container styles */
.ls-refund-page .ls-refund-page-container {
    display: flex;
    width: 100%;
    min-height: 100vh; /* Full viewport height to push footer below the fold */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ls-refund-page .ls-refund-form-side {
    width: 30%;
    padding: 40px;
    box-sizing: border-box;
}

/* Image side */
.ls-refund-image-side {
    width: 70%;
    background-size: cover;
    background-position: center center; /* Ensure image is centered */
    background-repeat: no-repeat;
    position: relative; /* For absolute positioning of pseudo-element if needed */
}



/* Typography */
.ls-refund-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #000;
}

.ls-refund-subtitle {
    font-size: 16px;
    margin-bottom: 25px;
    color: #333;
}

/* Help section */
.ls-help-section {
    margin-bottom: 20px;
}

.ls-help-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
}

.ls-help-link:hover {
    text-decoration: underline;
}

.ls-help-content {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
}

/* Legacy container - keep for backward compatibility */
.ls-refund-form-container {
    max-width: 800px;
    margin: 0 auto 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Form description */
.ls-refund-form-description {
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Error messages */
.ls-refund-error,
.ls-form-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.ls-field-error {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
}

.ls-form-row.has-error input,
.ls-form-row.has-error select,
.ls-form-row.has-error textarea {
    border-color: #dc3545;
}

/* Form rows */
.ls-form-row {
    margin-bottom: 20px;
}

.ls-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.ls-form-row input[type="text"],
.ls-form-row input[type="email"],
.ls-form-row select,
.ls-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

.ls-form-row input:focus {
    outline: none;
    border-color: #0066cc;
}

.ls-form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.ls-field-hint {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

/* Buttons */
.ls-button {
    width: 100%;
    padding: 12px 20px;
    background-color: #666666; /* Darker gray for better contrast */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: not-allowed;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3); /* Add text shadow for better readability */
}

.ls-button:not([disabled]) {
    background-color: #0078C8; /* New blue color */
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); /* Subtle shadow for enabled state */
}

.ls-button:not([disabled]):hover {
    background-color: #0067af; /* Slightly darker blue for hover */
}

/* Anchor tag styles for ls-button */
a.ls-button {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background-color: #0078C8; /* Blue color for anchor buttons */
    color: white !important;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    text-decoration: none !important;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    text-align: center;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

a.ls-button:hover {
    background-color: #0067af !important;
    color: white !important;
    text-decoration: none !important;
}

a.ls-button:visited {
    color: white !important;
}

/* Elementor override styles for buttons */
.elementor .ls-button,
.elementor button.ls-button,
.elementor input[type="submit"].ls-button,
.elementor a.ls-button,
form[data-dashbme-rid] .ls-button,
.ls-refund-lookup-form .ls-button,
button.ls-button[type="submit"] {
    width: 100% !important;
    padding: 12px 20px !important;
    background-color: #666666 !important; /* Darker gray for better contrast */
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    cursor: not-allowed !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    transition: background-color 0.3s ease !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important; /* Add text shadow for better readability */
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Enabled state with Elementor overrides */
.elementor .ls-button:not([disabled]),
.elementor button.ls-button:not([disabled]),
.elementor input[type="submit"].ls-button:not([disabled]),
.elementor a.ls-button,
form[data-dashbme-rid] .ls-button:not([disabled]),
.ls-refund-lookup-form .ls-button:not([disabled]),
button.ls-button[type="submit"]:not([disabled]) {
    background-color: #0078C8 !important; /* New blue color */
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important; /* Subtle shadow for enabled state */
}

/* Hover state with Elementor overrides */
.elementor .ls-button:not([disabled]):hover,
.elementor button.ls-button:not([disabled]):hover,
.elementor input[type="submit"].ls-button:not([disabled]):hover,
.elementor a.ls-button:hover,
form[data-dashbme-rid] .ls-button:not([disabled]):hover,
.ls-refund-lookup-form .ls-button:not([disabled]):hover,
button.ls-button[type="submit"]:not([disabled]):hover {
    background-color: #0067af !important; /* Slightly darker blue for hover */
    color: white !important;
    text-decoration: none !important;
}

/* Specific styles for the Next button */
.ls-next-button,
button.ls-next-button[type="submit"],
.elementor button.ls-next-button,
.elementor-widget-button .elementor-button.ls-next-button,
.elementor .elementor-element button.ls-next-button {
    background-color: #666666 !important; /* Darker gray for better contrast */
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important; /* Add text shadow for better readability */
}

.ls-next-button:not([disabled]),
button.ls-next-button[type="submit"]:not([disabled]),
.elementor button.ls-next-button:not([disabled]),
.elementor-widget-button .elementor-button.ls-next-button:not([disabled]),
.elementor .elementor-element button.ls-next-button:not([disabled]) {
    background-color: #0078C8 !important; /* New blue color */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important; /* Subtle shadow for enabled state */
}

/* Override for Elementor's orange button styling */
.elementor .elementor-button.ls-button,
.elementor button.ls-button,
.elementor a.ls-button,
.elementor-widget-button .elementor-button.ls-button,
.elementor .elementor-element button.ls-button,
.elementor .elementor-element a.ls-button {
    background-color: #666666 !important; /* Darker gray for better contrast */
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important; /* Add text shadow for better readability */
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.elementor .elementor-button.ls-button:not([disabled]),
.elementor button.ls-button:not([disabled]),
.elementor a.ls-button,
.elementor-widget-button .elementor-button.ls-button:not([disabled]),
.elementor .elementor-element button.ls-button:not([disabled]),
.elementor .elementor-element a.ls-button {
    background-color: #0078C8 !important; /* New blue color */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important; /* Subtle shadow for enabled state */
    color: white !important;
    text-decoration: none !important;
}

.elementor .elementor-button.ls-button:hover,
.elementor button.ls-button:hover,
.elementor a.ls-button:hover,
.elementor-widget-button .elementor-button.ls-button:hover,
.elementor .elementor-element button.ls-button:hover,
.elementor .elementor-element a.ls-button:hover {
    background-color: #0067af !important;
    color: white !important;
    text-decoration: none !important;
}

/* Legacy button styles - keep for backward compatibility */
.ls-button-secondary {
    background-color: #6c757d;
    margin-left: 10px;
}

.ls-button-secondary:hover {
    background-color: #5a6268;
}

/* Refund policy link */
.ls-refund-policy-link {
    margin-top: 30px;
    text-align: left;
}

.ls-refund-policy-link a {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
}

.ls-refund-policy-link a:hover {
    text-decoration: underline;
}

/* Order details */
.ls-order-details {
    background-color: #f8f9fa;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.ls-order-details h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

/* Products list */
.ls-products-list {
    margin-bottom: 25px;
}

.ls-product-item {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    padding: 15px;
    transition: background-color 0.3s;
}

.ls-product-item.selected {
    background-color: #f0f8ff;
    border-color: #b8daff;
}

.ls-product-item.has-error {
    border-color: #dc3545;
    background-color: #fcf2f2;
}

.ls-product-checkbox-wrapper {
    flex: 0 0 30px;
    display: flex;
    align-items: flex-start;
    padding-top: 5px;
}

.ls-product-checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.ls-product-checkbox {
    width: 20px;
    height: 20px;
}

.ls-product-image {
    flex: 0 0 80px;
    margin-right: 15px;
}

.ls-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #eee;
}

.ls-product-details {
    flex: 1;
}

.ls-product-details h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 16px;
}

.ls-product-price {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.ls-product-fields {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

/* Image preview */
.ls-image-preview {
    margin-top: 10px;
    max-width: 200px;
}

.ls-image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Upload states */
.ls-upload-loading {
    padding: 10px;
    background-color: #f0f8ff;
    border: 1px solid #007cba;
    border-radius: 4px;
    color: #007cba;
    font-size: 14px;
    text-align: center;
}

.ls-upload-success {
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    font-size: 12px;
    text-align: center;
}

.ls-upload-error {
    padding: 10px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    font-size: 14px;
    text-align: center;
}

/* Confirmation page */
.ls-refund-confirmation {
    text-align: center;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.ls-confirmation-message {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #28a745;
}

.ls-request-details {
    margin-bottom: 20px;
    text-align: left;
    display: inline-block;
}

.ls-request-details h3 {
    margin-top: 0;
}

/* Confirmation page button styling */
.ls-refund-confirmation a.ls-button {
    display: inline-block !important;
    width: auto !important;
    min-width: 200px;
    margin: 20px auto;
    padding: 12px 24px !important;
    background-color: #0078C8 !important;
    color: white !important;
    text-decoration: none !important;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}

.ls-refund-confirmation a.ls-button:hover {
    background-color: #0067af !important;
    color: white !important;
    text-decoration: none !important;
}

.ls-refund-confirmation a.ls-button:visited {
    color: white !important;
}

/* Required field indicator */
.required {
    color: #dc3545;
}

/* Loading spinner */
.ls-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ls-spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Tooltips */
.ls-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
}

.ls-tooltip-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: #6c757d;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    cursor: help;
}

.ls-tooltip-content {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.ls-tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.ls-tooltip-content.active {
    visibility: visible;
    opacity: 1;
}

/* Responsive styles */
@media (max-width: 768px) {
    /* Step 1: Mobile layout for split-screen */
    .ls-refund-page-step1 .ls-refund-page-container {
        flex-direction: column;
        min-height: 100vh; /* Maintain full height on mobile */
    }

    .ls-refund-page-step1 .ls-refund-form-side,
    .ls-refund-page-step1 .ls-refund-image-side {
        width: 100%;
    }

    .ls-refund-page-step1 .ls-refund-image-side {
        height: 250px; /* Slightly taller image area */
        order: -1; /* Move image to top on mobile */
        background-position: center top; /* Position from the top */
    }

    .ls-refund-page-step1 .ls-refund-form-side {
        padding: 20px;
        flex: 1; /* Take up remaining space */
    }

    /* Step 2 & 3: Mobile layout for single column */
    .ls-refund-page-step2 .ls-refund-page-container,
    .ls-refund-page-step3 .ls-refund-page-container {
        padding: 20px 15px;
        margin: 0 auto;
    }

    .ls-refund-page-step2 .ls-refund-form-side,
    .ls-refund-page-step3 .ls-refund-form-side {
        width: 100%;
        padding: 0;
    }

    /* Fallback: Original mobile styles */
    .ls-refund-page .ls-refund-page-container {
        flex-direction: column;
        min-height: 100vh; /* Maintain full height on mobile */
    }

    .ls-refund-page .ls-refund-form-side,
    .ls-refund-page .ls-refund-image-side {
        width: 100%;
    }

    .ls-refund-page .ls-refund-image-side {
        height: 250px; /* Slightly taller image area */
        order: -1; /* Move image to top on mobile */
        background-position: center top; /* Position from the top */
    }

    .ls-refund-page .ls-refund-form-side {
        padding: 20px;
        flex: 1; /* Take up remaining space */
    }

    .ls-product-item {
        flex-direction: column;
    }

    .ls-product-checkbox {
        margin-bottom: 10px;
    }

    .ls-product-image {
        margin-bottom: 10px;
        margin-right: 0;
    }

    .ls-form-submit .ls-button {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    .ls-form-submit .ls-button-secondary {
        margin-left: 0;
    }
}
