/* M2M Window Cleaning - Public Form Styles
   Glassmorphism design with "clean windows" aesthetic */

/* Reset & Base */
.m2m-wc-form-wrapper {
    --m2m-blue: #0ea5e9;
    --m2m-blue-dark: #0284c7;
    --m2m-blue-light: #e0f2fe;
    --m2m-teal: #14b8a6;
    --m2m-glass: rgba(255, 255, 255, 0.7);
    --m2m-glass-border: rgba(255, 255, 255, 0.4);
    --m2m-text: #0f172a;
    --m2m-text-light: #64748b;
    --m2m-radius: 16px;
    --m2m-shadow: 0 8px 32px rgba(14, 165, 233, 0.08);

    max-width: 700px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
}

/* Background gradient blob */
.m2m-wc-form-wrapper::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.m2m-wc-form-wrapper::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.m2m-wc-form {
    position: relative;
    z-index: 1;
}

/* Steps */
.m2m-step {
    animation: m2mFadeIn 0.4s ease;
}

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

.m2m-hidden {
    display: none !important;
}

/* Step Header */
.m2m-step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.m2m-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--m2m-blue), var(--m2m-teal));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.m2m-step-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--m2m-text);
    margin: 0;
    padding: 0;
    border: none;
}

/* Option Cards Grid */
.m2m-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.m2m-options-grid.m2m-three-col {
    grid-template-columns: repeat(3, 1fr);
}

/* Glassmorphism Option Card */
.m2m-option-card {
    background: var(--m2m-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid var(--m2m-glass-border);
    border-radius: var(--m2m-radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--m2m-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    font-size: inherit;
}

.m2m-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--m2m-blue), var(--m2m-teal));
    opacity: 0;
    transition: opacity 0.3s;
}

.m2m-option-card:hover {
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.12);
    transform: translateY(-2px);
}

.m2m-option-card:hover::before {
    opacity: 1;
}

.m2m-option-card.active {
    border-color: var(--m2m-blue);
    background: rgba(14, 165, 233, 0.06);
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.18), inset 0 0 0 1px rgba(14, 165, 233, 0.15);
}

.m2m-option-card.active::before {
    opacity: 1;
}

.m2m-option-icon {
    color: var(--m2m-blue);
    margin-bottom: 4px;
}

.m2m-option-card.active .m2m-option-icon {
    color: var(--m2m-blue-dark);
}

.m2m-option-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--m2m-text);
    display: block;
}

.m2m-option-desc {
    font-size: 13px;
    color: var(--m2m-text-light);
    display: block;
}

.m2m-option-price {
    font-size: 12px;
    color: var(--m2m-blue);
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

/* Frequency icons map */
.m2m-freq-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

/* Price Display - Glassmorphism hero */
.m2m-price-display {
    margin-bottom: 8px;
}

.m2m-price-glass {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(20, 184, 166, 0.06) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(14, 165, 233, 0.2);
    border-radius: 20px;
    padding: 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.m2m-price-glass::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    pointer-events: none;
}

.m2m-price-summary {
    font-size: 14px;
    color: var(--m2m-text-light);
    margin-bottom: 12px;
    position: relative;
}

.m2m-price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    position: relative;
}

.m2m-price-dollar {
    font-size: 28px;
    font-weight: 600;
    color: var(--m2m-blue);
}

.m2m-price-value {
    font-size: 56px;
    font-weight: 800;
    color: var(--m2m-text);
    line-height: 1;
    letter-spacing: -2px;
}

.m2m-price-period {
    font-size: 16px;
    color: var(--m2m-text-light);
    font-weight: 500;
}

.m2m-upsell {
    margin-top: 16px;
    font-size: 13px;
    color: var(--m2m-teal);
    font-weight: 600;
    position: relative;
}

.m2m-upsell:empty {
    display: none;
}

/* Form Fields */
.m2m-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.m2m-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.m2m-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--m2m-text);
    margin-bottom: 6px;
}

.m2m-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(14, 165, 233, 0.2);
    border-radius: 12px;
    font-size: 15px;
    background: var(--m2m-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s;
    color: var(--m2m-text);
    font-family: inherit;
    box-sizing: border-box;
}

.m2m-field input::placeholder {
    color: #94a3b8;
}

.m2m-field input:focus {
    outline: none;
    border-color: var(--m2m-blue);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

/* Checkout Button */
.m2m-checkout-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--m2m-blue) 0%, var(--m2m-teal) 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.m2m-checkout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(14, 165, 233, 0.4);
}

.m2m-checkout-btn:active {
    transform: translateY(0);
}

.m2m-checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Error Message */
.m2m-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
}

/* Back Button */
.m2m-back-btn {
    margin-top: 24px;
    padding: 10px 20px;
    background: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: var(--m2m-text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.m2m-back-btn:hover {
    border-color: var(--m2m-blue);
    color: var(--m2m-blue);
}

/* Locations Panel */
.m2m-locations-panel {
    animation: m2mFadeIn 0.4s ease;
}

.m2m-locations-field {
    text-align: center;
}

.m2m-locations-counter {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--m2m-glass);
    border: 1.5px solid var(--m2m-glass-border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
}

.m2m-loc-btn {
    width: 52px;
    height: 52px;
    border: none;
    background: none;
    font-size: 22px;
    font-weight: 700;
    color: var(--m2m-blue);
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m2m-loc-btn:hover {
    background: var(--m2m-blue-light);
}

.m2m-loc-btn:active {
    background: rgba(14, 165, 233, 0.15);
}

#m2m-num-locations {
    width: 70px;
    height: 52px;
    border: none;
    border-left: 1.5px solid var(--m2m-glass-border);
    border-right: 1.5px solid var(--m2m-glass-border);
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--m2m-text);
    background: transparent;
    font-family: inherit;
    -moz-appearance: textfield;
}

#m2m-num-locations::-webkit-outer-spin-button,
#m2m-num-locations::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#m2m-num-locations:focus {
    outline: none;
    background: rgba(14, 165, 233, 0.04);
}

.m2m-locations-hint {
    font-size: 13px;
    color: var(--m2m-text-light);
    margin: 0 0 20px;
}

.m2m-locations-field .m2m-checkout-btn {
    max-width: 300px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 600px) {
    .m2m-wc-form-wrapper {
        margin: 20px 16px;
    }

    .m2m-options-grid,
    .m2m-options-grid.m2m-three-col {
        grid-template-columns: 1fr;
    }

    .m2m-field-row {
        grid-template-columns: 1fr;
    }

    .m2m-price-value {
        font-size: 44px;
    }

    .m2m-option-card {
        padding: 20px 16px;
    }

    .m2m-price-glass {
        padding: 28px 20px;
    }
}
