/* =========================================================================
   LEGAL MODALS
   ========================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Modal Content Container */
.modal-container {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 0 0 10px rgba(65, 209, 236, 0.1);
    width: 90%;
    max-width: 800px;
    height: auto;
    max-height: 85vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

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

/* Header */
.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Body (Scrollable) */
.modal-body {
    padding: 24px;
    overflow-y: auto;
    font-family: 'Outfit', sans-serif;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.2);
}

/* Scrollbar styling */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Text Formatting */
.modal-body h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 16px;
}

.modal-body ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.modal-body strong {
    color: #fff;
    font-weight: 600;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        max-width: 100vw;
        border-radius: 0;
        border: none;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
        padding-bottom: 40px;
        /* Safe area for scrolling */
    }
}

/* Partnership Form Styles */
.partnership-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: var(--color-primary-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    /* 0px */
    padding: 12px 16px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(65, 209, 236, 0.05);
    box-shadow: 0 0 15px rgba(65, 209, 236, 0.1);
}

.form-group select option {
    background: #12121a;
    /* Using var(--color-bg-secondary) hex */
    color: #fff;
}

.form-footer {
    margin-top: 10px;
}

.w-full {
    width: 100%;
}

.form-status {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    text-align: center;
    min-height: 1.2rem;
    margin-top: 10px;
    letter-spacing: 0.05em;
}

.form-status.success {
    color: #4ade80;
}

.form-status.error {
    color: #f87171;
}

.form-status.loading {
    color: var(--color-primary);
    animation: statusPulse 1.5s infinite;
}

@keyframes statusPulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Fix for select arrow on some browsers */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 16px) center;
    padding-right: 40px;
}

@media (max-width: 768px) {
    .partnership-form {
        gap: 16px;
    }
}