/* Modal Download Katalog B2B (index.php #modalCorporateCatalog, components/catalog-request.php).
   Desktop: dialog lebar 2 kolom, body scroll, footer tetap terlihat.
   Mobile: layar penuh, header & footer menempel, tombol full width. */
.catalog-modal .modal-dialog {
    max-width: 760px;
}

.catalog-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3.5rem);
    border: none;
    border-radius: 18px;
    overflow: hidden;
}

.catalog-modal form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.catalog-modal .modal-header {
    flex: 0 0 auto;
    padding: 18px 24px;
    color: #fff;
    background: linear-gradient(135deg, #1c2c7a, #2f4bb0);
    border-bottom: none;
}

.catalog-modal .modal-header .close {
    color: #fff;
    opacity: .85;
    text-shadow: none;
}

.catalog-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 24px;
    background: linear-gradient(180deg, #f4f7ff 0%, #fff 100%);
    -webkit-overflow-scrolling: touch;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.catalog-grid > .catalog-full {
    grid-column: 1 / -1;
}

.catalog-grid .form-group {
    margin-bottom: 14px;
}

.catalog-grid label {
    font-size: 13.5px;
    font-weight: 500;
    color: #1e266d;
    margin-bottom: 6px;
}

.catalog-needs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
}

.catalog-needs .form-check-label {
    font-size: 13.5px;
    font-weight: 400;
    color: #3d4468;
}

.catalog-consent {
    margin-top: 4px;
    padding: 14px 16px;
    font-size: 12.5px;
    line-height: 1.6;
    background: #f1f4fd;
    border-radius: 14px;
}

.catalog-consent .form-check-label {
    font-size: 12.5px;
    font-weight: 400;
    color: #4a5173;
}

.catalog-modal .modal-footer {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: #fff;
    border-top: 1px solid rgba(30, 38, 109, .08);
}

.catalog-modal .modal-footer > * {
    margin: 0;
}

.catalog-note {
    flex: 1 1 auto;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6c7392;
}

.catalog-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

.catalog-actions .btn {
    white-space: nowrap;
}

.catalog-submit {
    color: #fff;
    background: linear-gradient(135deg, #1c2c7a, #2f4bb0);
    border: none;
}

.catalog-submit:hover,
.catalog-submit:focus {
    color: #fff;
    filter: brightness(1.08);
}

@media (max-width: 767.98px) {
    .catalog-modal .modal-dialog {
        max-width: 540px;
    }

    .catalog-grid,
    .catalog-needs {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .catalog-modal .modal-dialog {
        max-width: none;
        height: 100%;
        margin: 0;
    }

    .catalog-modal .modal-content {
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .catalog-modal .modal-header,
    .catalog-modal .modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .catalog-modal .modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 20px -14px rgba(17, 22, 51, .35);
    }

    .catalog-note {
        text-align: center;
    }

    .catalog-actions .btn {
        flex: 1 1 0;
        padding-left: 12px;
        padding-right: 12px;
    }

    .catalog-actions .catalog-submit {
        flex-grow: 2;
    }
}
