/* === PGBB Forms & Confidentiality Modal === */

/* === Confidentiality Overlay === */
.confidentiality-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.confidentiality-modal {
    background: var(--pgbb-white);
    border-radius: var(--radius-xl);
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.confidentiality-modal-header {
    background: linear-gradient(135deg, var(--pgbb-purple) 0%, var(--pgbb-purple-dark) 100%);
    padding: 1.5rem 2rem;
    padding-right: 3.5rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.confidentiality-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.confidentiality-modal-close:hover,
.confidentiality-modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    color: var(--pgbb-white);
    outline: none;
}

.confidentiality-modal-close:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.confidentiality-modal-header h2 {
    color: var(--pgbb-white);
    font-size: 1.375rem;
    margin-bottom: 0.25rem;
}

.confidentiality-modal-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.confidentiality-modal-body {
    padding: 2rem;
}

.nda-legal-text {
    background: var(--pgbb-gray-lightest);
    border: 1px solid var(--pgbb-gray-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--pgbb-gray-dark);
}

.nda-legal-text h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--pgbb-dark);
}

.nda-form-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.nda-form-success {
    text-align: center;
    padding: 3rem 2rem;
}

.nda-form-success svg {
    width: 48px;
    height: 48px;
    color: var(--pgbb-green);
    margin-bottom: 1rem;
}

.nda-form-success h3 {
    color: var(--pgbb-dark);
    margin-bottom: 0.5rem;
}

.nda-form-success p {
    color: var(--pgbb-gray);
}

/* === Sell Your Business Form === */
.sell-form-section {
    background: var(--pgbb-gray-lightest);
    border: 1px solid var(--pgbb-gray-light);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
}

.sell-form-section h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--pgbb-dark);
}

.sell-form-section > p {
    color: var(--pgbb-gray);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

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

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* Highlights repeater */
.highlights-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.highlight-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.highlight-row input {
    flex: 1;
}

.highlight-remove {
    background: none;
    border: 1px solid #FECACA;
    color: #DC2626;
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.highlight-remove:hover {
    background: #FEF2F2;
}

.highlight-add {
    background: none;
    border: 1px dashed var(--pgbb-gray-light);
    color: var(--pgbb-gray);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.highlight-add:hover {
    border-color: var(--pgbb-green);
    color: var(--pgbb-green);
}

/* File upload */
.file-upload-area {
    border: 2px dashed var(--pgbb-gray-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--pgbb-purple);
    background: rgba(123, 45, 142, 0.02);
}

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

.file-upload-area p {
    color: var(--pgbb-gray);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.file-upload-name {
    color: var(--pgbb-green);
    font-weight: 500;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

/* Contact form */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.contact-info-card {
    background: var(--pgbb-gray-lightest);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.contact-info-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--pgbb-purple);
    color: var(--pgbb-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 18px;
    height: 18px;
}

.contact-info-text h4 {
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.contact-info-text p {
    font-size: 0.875rem;
    color: var(--pgbb-gray);
    margin-bottom: 0;
}

.contact-info-text a {
    color: var(--pgbb-purple);
}

/* === Mobile: forms === */
@media (max-width: 767px) {
    .confidentiality-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .confidentiality-modal {
        max-height: 100vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-width: 100%;
    }

    .confidentiality-modal-body {
        padding: 1.25rem;
    }

    .confidentiality-modal-body .form-group div[style*="grid-template-columns: 1fr 1fr 1fr"],
    .confidentiality-modal-body div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .confidentiality-modal-body div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .sell-form-section {
        padding: 1.25rem;
    }

    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}
