@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;500;600;700&display=swap');

/* ========== OVERLAY ========== */
.stc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.stc-overlay.is-active {
    display: flex;
    opacity: 1;
}

/* ========== MODAL ========== */
.stc-modal {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: #ffffff;
    border-radius: 16px;
    padding: 56px 48px 48px 48px;
    box-sizing: border-box;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.stc-overlay.is-active .stc-modal {
    transform: scale(1);
    opacity: 1;
}

.stc-modal::-webkit-scrollbar {
    width: 8px;
}

.stc-modal::-webkit-scrollbar-track {
    background: #F4EDE7;
    border-radius: 4px;
}

.stc-modal::-webkit-scrollbar-thumb {
    background: #D4AE89;
    border-radius: 4px;
}

/* ========== CLOSE BUTTON ========== */
.stc-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 41px;
    height: 41px;
    border-radius: 66px !important;
    border: 1px solid #D4AE89 !important;
    background: transparent !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    padding: 0;
}

.stc-close:hover,
.stc-close:focus,
.stc-close:active {
    opacity: 0.7;
    background: transparent !important;
    border-color: #D4AE89 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ========== HEADER ========== */
.stc-header {
    margin-bottom: 36px;
}

.stc-title {
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 36px;
    margin: 0 0 8px 0;
}

.stc-subtitle {
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
    opacity: 0.8;
}

/* ========== FORM ========== */
.stc-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stc-row {
    display: flex;
    gap: 24px;
}

.stc-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stc-field-full {
    width: 100%;
}

.stc-field label {
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.stc-field input[type="text"],
.stc-field input[type="email"],
.stc-field input[type="tel"],
.stc-field input[type="url"] {
    height: 48px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: #F4EDE7;
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.stc-field input::placeholder {
    color: #B58455;
    opacity: 0.5;
}

.stc-field input:focus {
    border-color: #D4AE89;
}

/* ========== FILE UPLOAD ========== */
.stc-file-upload {
    position: relative;
    border: 2px dashed #D4AE89;
    border-radius: 12px;
    background: #F4EDE7;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stc-file-upload:hover {
    border-color: #B58455;
    background: #F9F5F1;
}

.stc-file-upload.is-dragover {
    border-color: #B58455;
    background: #F9F5F1;
    transform: scale(1.02);
}

.stc-file-upload.has-file {
    border-style: solid;
    border-color: #B58455;
}

.stc-file-upload.has-error {
    border-color: #dc3545;
}

.stc-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.stc-file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    gap: 16px;
}

.stc-file-upload.has-file .stc-file-upload-content {
    display: none;
}

.stc-file-upload-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stc-file-upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.stc-file-upload-label {
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.stc-file-upload-hint {
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    opacity: 0.7;
}

/* ========== FILE SELECTED ========== */
.stc-file-selected {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.stc-file-upload.has-file .stc-file-selected {
    display: flex;
}

.stc-file-upload.has-file input[type="file"] {
    display: none;
}

.stc-file-selected-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stc-file-selected-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.stc-file-selected-name {
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stc-file-selected-size {
    color: #B58455;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    opacity: 0.7;
}

.stc-file-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #D4AE89;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 3;
    position: relative;
}

.stc-file-remove:hover {
    background: #D4AE89;
}

.stc-file-remove:hover svg path {
    stroke: #ffffff;
}

/* ========== FILE ERROR ========== */
.stc-file-error {
    color: #dc3545;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    display: none;
    margin-top: 4px;
}

.stc-file-error.is-visible {
    display: block;
}

/* ========== SUBMIT BUTTON ========== */
.stc-submit {
    padding: 14px 32px !important;
    min-width: 200px;
    border-radius: 66px !important;
    border: none !important;
    background: #D4AE89 !important;
    color: #ffffff !important;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    align-self: flex-start;
}

.stc-submit:hover,
.stc-submit:focus,
.stc-submit:active {
    opacity: 0.9;
    background: #D4AE89 !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.stc-submit:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed;
    background: #D4AE89 !important;
}

.stc-submit-loading {
    display: none;
}

.stc-submit:disabled .stc-submit-text {
    display: none;
}

.stc-submit:disabled .stc-submit-loading {
    display: inline;
}

/* ========== MESSAGE ========== */
.stc-message {
    display: none;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-align: center;
}

.stc-message.is-visible {
    display: block;
}

.stc-message.success {
    background: #d4edda;
    color: #155724;
}

.stc-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* ========== MOBILE ========== */
@media (max-width: 767px) {
    .stc-modal {
        padding: 48px 24px 32px 24px;
        max-height: 95vh;
    }

    .stc-title {
        font-size: 24px;
        line-height: 32px;
    }

    .stc-subtitle {
        font-size: 14px;
        line-height: 20px;
    }

    .stc-row {
        flex-direction: column;
    }

    .stc-field input[type="text"],
    .stc-field input[type="email"],
    .stc-field input[type="tel"],
    .stc-field input[type="url"] {
        height: 44px;
    }

    .stc-file-upload-content {
        padding: 24px 16px;
    }

    .stc-file-upload-icon {
        width: 48px;
        height: 48px;
    }

    .stc-file-upload-icon svg {
        width: 24px;
        height: 24px;
    }

    .stc-submit {
        width: 100%;
    }
}
