/* Partner Application Modal - Glassmorphism Design */

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(95, 95, 96, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Content */
.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(184, 184, 172, 0.2);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 48px;
    box-shadow: 0 24px 64px rgba(95, 95, 96, 0.15);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: var(--text-stone);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-carbon);
}

/* Modal Header */
.modal-header {
    margin-bottom: 32px;
}

.modal-header h2 {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-carbon);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.modal-header p {
    font-size: 1rem;
    color: var(--text-stone);
    line-height: 1.6;
    opacity: 0.8;
}

/* Form Styles */
.partner-application-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-carbon);
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-carbon);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(184, 184, 172, 0.3);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-stone);
    opacity: 0.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(149, 173, 186, 0.5);
    box-shadow: 0 0 0 4px rgba(149, 173, 186, 0.1);
}

.form-group select {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px 32px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, var(--accent-ocean) 0%, var(--accent-moss) 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 8px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(149, 173, 186, 0.3);
}

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

.btn-loading {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline;
}

/* Error Message */
.error-message {
    display: none;
    padding: 12px 16px;
    background: rgba(232, 141, 122, 0.1);
    border: 1px solid rgba(232, 141, 122, 0.3);
    border-radius: 8px;
    color: var(--accent-clay);
    font-size: 0.9rem;
    line-height: 1.5;
}

.error-message.visible {
    display: block;
}

/* Input Error State */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: rgba(232, 141, 122, 0.5);
    box-shadow: 0 0 0 4px rgba(232, 141, 122, 0.1);
}

/* Success Message */
.success-message {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px;
    background: rgba(124, 174, 159, 0.1);
    border: 1px solid rgba(124, 174, 159, 0.3);
    border-radius: 12px;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.success-message.visible {
    display: flex;
}

.success-message p {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--accent-moss);
    margin: 0;
}

/* Checkmark Animation */
.checkmark {
    width: 56px;
    height: 56px;
    stroke-width: 2;
    stroke: var(--accent-moss);
    stroke-miterlimit: 10;
    animation: scaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s backwards;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--accent-moss);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        padding: 32px 24px;
        width: 95%;
        max-height: 95vh;
    }

    .modal-header h2 {
        font-size: 1.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .modal-close {
        top: 16px;
        right: 16px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal-content,
    .success-message,
    .checkmark,
    .checkmark-circle,
    .checkmark-check {
        animation: none;
        transition: none;
    }
}
