/*
=============================================================================
 FILE: wwwroot/css/site.css
 DESC: Custom stylesheet for the Gallagher Bassett Portal.
 UPDATED: Improved dashboard container sizing to fill available space.
=============================================================================
*/

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');


/* --- Brand Colours & Root Variables --- */
:root {
    --gb-primary-blue: #003A70;
    --gb-accent-orange: #faa61a;
    --gb-accent-orange-hover: #fbc13a;
    --gb-dark-grey: #333333;
    --gb-medium-grey: #666666;
    --gb-light-grey-bg: #f4f4f4;
    --gb-meta-header-bg: #e9ecef;
    --gb-border-grey: #cccccc;
    --gb-white: #ffffff;
    --gb-link-blue: #0056b3;
}

/* --- General Body & Layout --- */
html, body {
    height: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--gb-dark-grey);
    background-color: var(--gb-light-grey-bg);
    display: flex;
    flex-direction: column;
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

    .main-content > main {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

.footer {
    flex-shrink: 0; /* Prevents footer from shrinking */
}


/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--gb-primary-blue);
    font-weight: 700;
}

h1 {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 0.5em;
    margin-top: 1.5rem;
}

/* --- Buttons, Header, Navbar, Login styles remain the same... --- */
/* ... */


/* --- Dashboard Page Styles --- */
.dashboard-container {
    height: 85vh; /* Increased height to take up more of the viewport */
    min-height: 650px; /* A sensible minimum for desktop views */
    margin-top: 20px;
    border: 1px solid var(--gb-border-grey);
    border-radius: 4px;
    display: flex; /* Use flexbox to control child elements */
    flex-direction: column;
}

    /* This targets the iframe that the Power BI JS library creates inside our div */
    .dashboard-container > iframe {
        border: none; /* Remove the default iframe border */
        flex-grow: 1; /* This is the key: it makes the iframe expand to fill the container */
    }


/* --- Responsive Styles --- */
@media (max-width: 991.98px) {
    .meta-header .nav {
        display: none;
    }
}

@media (max-width: 767.98px) {
    h1 {
        font-size: 2em;
        margin-top: 1rem;
    }

    .dashboard-container {
        height: 75vh;
        min-height: 500px;
    }

    /* ... other responsive styles remain the same ... */
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--gb-accent-orange);
    border-color: var(--gb-accent-orange);
    font-weight: 600;
    padding: 12px 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .btn-primary:hover, .btn-primary:focus {
        background-color: var(--gb-accent-orange-hover);
        border-color: var(--gb-accent-orange-hover);
    }

/* --- Header & Navbar --- */
.meta-header {
    background-color: var(--gb-meta-header-bg);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--gb-border-grey);
}

.main-header.navbar {
    background-color: var(--gb-white);
}

    .main-header.navbar .navbar-brand-logo {
        height: 20px; /* UPDATED: Logo height reduced by 50% */
        width: auto;
    }

    .main-header.navbar .nav-link {
        color: var(--gb-dark-grey);
        font-weight: 500;
    }

.navbar-user-info {
    display: flex;
    align-items: center;
}

    .navbar-user-info .navbar-text {
        margin-right: 1rem;
    }

    .navbar-user-info .btn-link {
        color: var(--gb-dark-grey);
        text-decoration: none;
        padding: 0;
        font-weight: 500;
    }

/* --- Login Page Specific Styles --- */
.login-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.login-box {
    background-color: var(--gb-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

/* --- Responsive Styles --- */
@media (max-width: 991.98px) {
    .meta-header .nav {
        display: none;
    }
}

@media (max-width: 767.98px) {
    h1 {
        font-size: 2em;
        margin-top: 1rem;
    }

    .login-box {
        padding: 20px;
        box-shadow: none;
        border-radius: 0;
    }

    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
