﻿html {
    font-size: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: antialiased;
    -o-font-smoothing: antialiased;
    font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hanken Grotesk:wght@300;400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hanken Grotesk:wght@300;400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* General Modal */
.modal-dialog {
    position: relative;
    width: auto;
    margin: 2rem auto;
    max-width: 650px;
    border-radius: 12px;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    height: auto; /* expand naturally */
    max-height: none; /* no restriction */
}

.modal-body {
    padding: 1.25rem 1.5rem;
    line-height: 1.6;
    flex: 1 1 auto;
    overflow-y: auto; /* ✅ only body scrolls if content is too tall */
}

/* Header */
.modal-header {
    border: 0;
    padding: 1rem 1rem;
    position: relative;
    flex-shrink: 0;
}

    .modal-header .close {
        margin: 0;
        position: absolute;
        top: -12px;
        right: -12px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background-color: #f1f1f1;
        color: red;
        font-size: 1.5rem;
        font-weight: 700;
        opacity: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        transition: background 0.2s ease;
    }



/* Footer */
.modal-footer {
    border: 0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0; /* keeps footer visible */
}

    .modal-footer .btn {
        border-radius: 8px;
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
        font-weight: 500;
    }

/* Responsive */
@media (max-width: 575px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: 95%;
        max-height: 110vh;
    }

    .modal-content {
        border-radius: 10px;
    }

    .modal-body {
        overflow-y: auto;
        flex: 1 1 auto;
    }

    .modal-header,
    .modal-footer {
        padding: 1rem;
    }

        .modal-header .close {
            top: -10px;
            right: -10px;
            width: 32px;
            height: 32px;
            font-size: 24px;
            font-weight:600;
        }
}

@media (min-width: 576px) and (max-width: 991px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: 95%;
        max-height: 110vh;
    }
    .modal-content {
        border-radius: 10px;
    }

    .modal-body {
        overflow-y: auto;
        flex: 1 1 auto;
    }

    .modal-header,
    .modal-footer {
        padding: 1rem;
    }

        .modal-header .close {
            top: -10px;
            right: -10px;
            width: 32px;
            height: 32px;
            font-size: 24px;
            font-weight: 600;
        }
}

@media (min-width: 992px) {
    .modal-dialog {
        margin: 2rem auto;
        max-width: 600px;
        max-height: 100vh;
    }

    .modal-lg {
        max-width: 900px;
    }

    .modal-sm {
        max-width: 350px;
    }
}

/* Base Styles (for desktop and tablets) */
.modalheading {
    font-size: 1.5rem;
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 600;
    color: #007BFF;
    letter-spacing: .5px;
    margin-bottom: 0.35rem;
}

.title {
    font-size: 1.25rem;
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 600;
    color: #5C5C66;
    letter-spacing: .5px;
    margin-bottom: 0.35rem;
}

.card-title {
    font-size: 1.25rem;
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 700;
    color: #007BFF;
    letter-spacing: .5px;
    margin-bottom: 0.35rem;
}

.card-text {
    font-size: .9rem;
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 400;
    color: #4a4a4a;
    letter-spacing: .5px;
    margin-bottom: 0.35rem;
}


/* Mobile Devices (max-width: 768px and smaller) */
@media (max-width: 768px) {
    .modalheading {
        font-size: 1.25rem;
    }

    .title {
        font-size: 1rem;
    }

    .card-title {
        font-size: .9rem;
    }

    .card-text {
        font-size: 0.875rem;
    }
}

/* Extra Small Mobile Devices (max-width: 576px) */
@media (max-width: 576px) {
    .modalheading {
        font-size: 1.1rem;
    }

    .title {
        font-size: 1rem;
    }

    .card-title {
        font-size: .9rem;
    }

    .card-text {
        font-size: 0.875rem;
    }
}