/* ==========================================================================
   MODAL MULTI-STEP - Skull Coquetelaria
   ========================================================================== */

.step-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity .3s, visibility .3s;
}

.step-modal.active {
    visibility: visible;
    opacity: 1;
}

.step-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(4px);
}

.step-modal__container {
    position: relative;
    width: 95%;
    max-width: 560px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5);
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(.97);
    transition: transform .3s ease;
    overflow: hidden;
}

.step-modal.active .step-modal__container {
    transform: translateY(0) scale(1);
}

.step-modal__close {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 25px;
    height: 25px;
    border: none;
    background: rgba(255, 255, 255, .15);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    transition: background .2s;
    z-index: 10;
}

.step-modal__close:hover {
    background: rgba(255, 255, 255, .25);
}

.step-modal__header {
    padding: 28px 24px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
}

.step-modal__progress {
    margin-bottom: 16px;
}

.step-modal__progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.step-modal__progress-step {
    font-weight: 600;
    color: #c9a962;
}

.step-modal__progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, .15);
    border-radius: 2px;
    overflow: hidden;
}

.step-modal__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a962, #d4bc7a);
    border-radius: 2px;
    transition: width .4s ease;
}

.step-modal__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 4px;
}

.step-modal__subtitle {
    font-size: 14px;
    opacity: .8;
    margin: 0;
}

.step-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.step-modal__steps {
    position: relative;
}

.step-modal__step {
    display: none;
    animation: stepFadeIn .3s ease;
}

.step-modal__step.active {
    display: block;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-field {
    margin-bottom: 20px;
}

.step-field:last-child {
    margin-bottom: 0;
}

.step-field__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.step-field__label span {
    color: #c9a962;
}

.step-field__hint {
    display: block;
    font-size: 12px;
    color: #888;
    font-weight: 400;
    margin-top: 4px;
}

.step-field__input,
.step-field__select,
.step-field__textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    color: #333;
    background: #f8f8f8;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.step-field__input:focus,
.step-field__select:focus,
.step-field__textarea:focus {
    outline: none;
    background: #fff;
    border-color: #c9a962;
    box-shadow: 0 0 0 4px rgba(201, 169, 98, .12);
}

.step-field__input::placeholder,
.step-field__textarea::placeholder {
    color: #aaa;
}

.step-field__select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.5L1 3.5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.step-field__textarea {
    min-height: 100px;
    resize: vertical;
}

.step-field--error .step-field__input,
.step-field--error .step-field__select,
.step-field--error .step-field__textarea {
    border-color: #dc3545;
    background: #fff5f5;
}

.step-field__error {
    display: none;
    font-size: 12px;
    color: #dc3545;
    margin-top: 6px;
}

.step-field--error .step-field__error {
    display: block;
}

.step-modal__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px 24px;
    gap: 12px;
    background: #fff;
    border-top: 1px solid #eee;
}

.step-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    border: none;
}

.step-modal__btn--back {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
}

.step-modal__btn--back:hover:not(:disabled) {
    border-color: #bbb;
    color: #333;
}

.step-modal__btn--back:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.step-modal__btn--next {
    flex: 1;
    max-width: 220px;
    margin-left: auto;
    background: linear-gradient(135deg, #c9a962, #d4bc7a);
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(201, 169, 98, .3);
}

.step-modal__btn--next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 98, .4);
}

.step-modal__btn--next:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.step-modal__btn svg {
    width: 18px;
    height: 18px;
}

.step-modal__btn--next .btn-loading {
    display: none;
}

.step-modal__btn--next.loading .btn-text,
.step-modal__btn--next.loading svg {
    display: none;
}

.step-modal__btn--next.loading .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-modal__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(26, 26, 26, .2);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

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

.step-modal__success {
    display: none;
    text-align: center;
    padding: 20px 0;
    animation: stepFadeIn .4s ease;
}

.step-modal__success.active {
    display: block;
}

.step-modal__success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: #28a745;
}

.step-modal__success-icon svg {
    width: 100%;
    height: 100%;
}

.step-modal__success-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.step-modal__success-text {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 28px;
}

.step-modal__success-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: #25d366;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all .2s;
}

.step-modal__success-btn:hover {
    background: #1fb855;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, .35);
}

.step-modal__alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.step-modal__alert.show {
    display: block;
}

.step-modal__alert--error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.step-modal.success .step-modal__steps,
.step-modal.success .step-modal__footer {
    display: none;
}

/* Responsive */
@media (max-width: 640px) {
    .step-modal__container {
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        border-radius: 0;
    }

    .step-modal__header {
        padding: 20px 20px 16px;
    }

    .step-modal__title {
        font-size: 22px;
    }

    .step-modal__body {
        padding: 20px;
    }

    .step-modal__footer {
        padding: 16px 20px 20px;
        flex-wrap: wrap;
    }

    .step-modal__btn--back {
        order: 2;
        padding: 12px 20px;
    }

    .step-modal__btn--next {
        order: 1;
        width: 100%;
        max-width: 100%;
    }

    .step-modal__close {
        top: 12px;
        right: 12px;
    }
}