/* =============================================
   Brought Dead Intimation — Module Styles
   (brought_dead.css)
   Global theme loaded from style.css
   ============================================= */

/* --- Module-Specific Overrides --- */
body {
    font-family: Arial, sans-serif;
}

.app-header {
    background-color: var(--surface);
    text-align: center;
    padding: 15px;
    border-bottom: 2px solid var(--card-bg);
}

.app-header h2 {
    margin: 0;
    color: var(--highlight);
    font-size: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
}

/* --- Section Titles --- */
.section-title {
    color: var(--highlight);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--card-bg);
    padding-bottom: 5px;
    margin-bottom: 15px;
    margin-top: 20px;
}

.section-title:first-child {
    margin-top: 0;
}

/* --- Input Grid --- */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
}

/* Form inputs use cobalt border */
input, select, textarea {
    border-color: var(--card-bg);
}

/* --- Module Buttons --- */
.primary-btn, .secondary-btn, .gold-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    transition: 0.2s;
}

.primary-btn {
    background-color: var(--primary);
    color: var(--bg);
}

.primary-btn:active { background-color: #00cccc; }

.secondary-btn {
    background-color: var(--card-bg);
    color: var(--text);
}

.secondary-btn:active { background-color: #003380; }

.gold-btn {
    background-color: var(--highlight);
    color: var(--bg);
}

.gold-btn:active { background-color: #b8962e; }

.action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.action-bar button {
    margin-bottom: 0;
}

/* --- Document Print Styling --- */
.document-wrapper {
    background-color: #d6eaf8;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    border-radius: 8px;
    margin-top: 20px;
}

.letter-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.letter-content.pdf-mode {
    gap: 0;
    display: block;
}

.letter-page {
    background-color: white !important;
    color: black !important;
    width: 210mm;
    height: 295mm;
    overflow: hidden;
    padding: 20mm;
    box-sizing: border-box;
    font-family: 'Times New Roman', serif;
    font-size: 14pt;
    line-height: 1.6;
    text-align: justify;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    margin: 0 auto;
}

.letter-content.pdf-mode .letter-page {
    box-shadow: none !important;
    margin: 0 auto;
}

.letter-page p {
    margin: 10px 0;
}

.letter-page .indent {
    text-indent: 40px;
}

.letter-page .right-align {
    text-align: right;
    margin-top: 40px;
}

/* --- Print CSS --- */
@media print {
    body * {
        visibility: hidden;
    }
    .document-wrapper, .document-wrapper * {
        visibility: visible;
    }
    .document-wrapper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        background-color: white;
        box-shadow: none;
    }
    .letter-content {
        gap: 0;
    }
    .letter-page {
        box-shadow: none;
        margin: 0;
    }
}

/* Mobile preview zoom */
@media (max-width: 850px) {
    .document-wrapper {
        padding: 10px;
    }
    .letter-content:not(.pdf-mode) {
        zoom: calc((100vw - 20px) / 820);
    }
}
