/* ============================= */
/* Reset & base                   */
/* ============================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: #f5f6f8;
    color: #222;
    font-size: 17px;
    line-height: 1.5;
}


/* ============================= */
/* Header / Nav / Footer          */
/* ============================= */

.header {
    background: linear-gradient(180deg, #f5f5f5 0%, #b0b0b0 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.header img {
    height: 45px;
    width: auto;
}

/* Site-wide navigation, shown on every page. */
.site-nav {
    display: flex;
    gap: 10px;
}

.site-nav a {
    padding: 9px 20px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: #555;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    background: white;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
    background: #eef7ee;
    border-color: #4caf50;
    color: #2e7d32;
}

.site-nav a:active {
    background: white;
    border-color: #d1d5db;
    color: #555;
}

.site-nav a.active {
    background: #232E50;
    border-color: #232E50;
    color: white;
}

.site-nav a.active:hover {
    background: #1a2340;
    border-color: #1a2340;
    color: white;
}

@media (max-width: 700px) {
    .header {
        padding: 14px 20px;
        justify-content: center;
        text-align: center;
    }

    .site-nav {
        width: 100%;
        justify-content: center;
    }
}

.footer {
    flex-shrink: 0;
    margin-top: 60px;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 30px 20px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
}

.footer-logo img {
    width: 180px;
    height: auto;
}

.footer-info {
    text-align: center;
    color: #7d8b8f;
    font-size: 14px;
    line-height: 1.6;
}

.footer-info p {
    margin: 5px 0;
}


/* ============================= */
/* Page container / card          */
/* ============================= */

.container {
    flex: 1 0 auto;
    max-width: 800px;
    margin: 60px auto;
    padding: 20px;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

h1 {
    margin-top: 0;
    font-size: 30px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #777;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Card header row with a title on the left and an action
   (link/button) on the right — used on both pages. */
.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.card-title-row h1 {
    margin: 0;
    text-align: left;
}


/* ============================= */
/* Buttons                        */
/* ============================= */

button {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: #222;
    color: white;
    font-size: 17px;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #444;
}

button:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.secondary-button {
    background: #f3f4f6;
    color: #222;
    border: 1px solid #d1d5db;
}

.secondary-button:hover {
    background: #e5e7eb;
}

.danger-button {
    background: #b42318;
    border: 1px solid #b42318;
    color: #fff;
}

.danger-button:hover {
    background: #8f1c13;
    border-color: #8f1c13;
}

.card-title-row .secondary-button {
    width: auto;
    margin-top: 0;
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}


/* ============================= */
/* Shared modal component         */
/* ============================= */
/* Used by: cancel-processing modal (index.html)
   and transcript modal (history.html). */

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 24, 39, 0.38);
    backdrop-filter: blur(2px);
    z-index: 9999;
}

.custom-modal {
    width: min(100%, 440px);
    padding: 26px;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.custom-modal-title {
    margin-bottom: 10px;
    color: #222;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
}

.custom-modal-text {
    margin-bottom: 24px;
    color: #5f6368;
    font-size: 14px;
    line-height: 1.55;
}

.custom-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.custom-modal-actions button {
    width: auto;
    margin-top: 0;
    padding: 10px 16px;
    border-radius: 9px;
    font-size: 14px;
    white-space: nowrap;
}

.custom-modal-actions .secondary-button {
    background: #f5f6f7;
}

.custom-modal-actions .danger-button:hover {
    background: #8f2722;
    border-color: #8f2722;
    color: #ffffff;
}


/* ============================= */
/* Shared responsive rules        */
/* ============================= */

@media (max-width: 700px) {
    .container {
        margin: 30px auto;
    }

    .card {
        padding: 24px;
    }

    .header {
        padding: 12px 20px;
    }

    .card-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .card-title-row h1 {
        text-align: center;
    }

    .card-title-row .secondary-button {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .custom-modal-actions {
        flex-direction: column-reverse;
    }

    .custom-modal-actions button {
        width: 100%;
    }
}

.header-logo-row {
    display: flex;
    align-items: center;
}
