/* Reset and Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* Print Button */
.print-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.action-btn {
    background-color: #00a650;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 166, 80, 0.4);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}
.action-btn:hover { background-color: #008f45; transform: translateY(-2px); }

/* Form validation Warning */
.warning-box {
    background-color: #fee2e2;
    color: #dc2626;
    padding: 15px;
    border-left: 4px solid #dc2626;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}

.input-error {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

/* Containers */
.container-wrapper {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    padding: 20px 40px 40px 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.top-disclaimer {
    text-align: center;
    color: #e01e26;
    font-size: 0.95em;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: 10px;
}

.alarm-table {
    width: 100%;
    border-collapse: collapse;
    border: 3px solid #149441; /* Thick Green border around everything */
}

.alarm-table td {
    border: 1px solid #149441;
    padding: 10px;
    vertical-align: middle;
}

/* Typography */
.red-text { color: #e01e26 !important; }
.green-text { color: #149441 !important; }

/* Header Row */
.header-row td {
    border-bottom: 3px solid #149441;
}
.col-info {
    width: 30%;
    font-size: 14px;
}
.col-title {
    width: 40%;
    text-align: center;
}
.main-title {
    font-size: 36px;
    letter-spacing: 5px;
    margin: 0;
    font-weight: bold;
}
.col-logo {
    width: 30%;
    text-align: center;
}
.logo-img {
    width: 60px;
    margin-bottom: 5px;
}
.logo-text {
    font-weight: bold;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

/* Form Rows */
.label-col {
    width: 30%;
    font-size: 16px;
}
.input-col {
    width: 35%;
}
.phone-col {
    width: 35%;
}
.phone-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
}
.phone-wrapper span {
    margin-right: 10px;
    font-size: 12px;
    min-width: 20px;
}
.form-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #000;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}
.read-only-text {
    font-size: 15px;
    line-height: 1.4;
}

/* Mid Sections */
.divide-row td {
    text-align: center;
    padding: 10px;
}
.green-divider td {
    border-bottom: 1px solid #149441;
}
.red-divider td {
    border-bottom: 3px solid #149441;
}
.divide-row h2 {
    font-size: 24px;
    margin-bottom: 5px;
}
.divide-row p {
    font-size: 16px;
    font-weight: bold;
}

/* Action Rows */
.action-row td {
    padding: 10px;
}
.action-label {
    font-size: 15px;
    vertical-align: top;
}
.action-icon-col {
    width: 90px;
    text-align: center;
    vertical-align: top;
    padding: 5px !important;
}
.action-icon-col img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}
.action-text {
    vertical-align: top;
    font-size: 15px;
    line-height: 1.4;
}

/* Footer Box */
.footer-row td {
    border-top: 3px solid #149441;
    padding: 15px;
    font-size: 14px;
    line-height: 1.4;
}
.no-bullet {
    list-style-type: none;
    padding-left: 20px;
    margin-top: 5px;
}

/* ============================================================
   MOBILE RESPONSIVE (max-width: 640px)
   ============================================================ */
@media (max-width: 640px) {

    /* Container */
    .container-wrapper {
        margin: 0;
        padding: 8px;
        box-shadow: none;
    }

    /* Print/action button */
    .print-actions {
        bottom: 12px;
        right: 12px;
    }
    .action-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Nav bar */
    .lang-change-bar {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* ---- All table rows → stacked blocks ---- */
    .alarm-table,
    .alarm-table tbody,
    .alarm-table tr {
        display: block;
    }
    .alarm-table td {
        display: block;
        width: 100% !important;
        border-right: none;
        border-left: none;
        padding: 8px 10px;
        box-sizing: border-box;
    }

    /* ---- Header: hide version/logo, center title ---- */
    .header-row .col-info,
    .header-row .col-logo {
        display: none;
    }
    .col-title {
        width: 100% !important;
        padding: 10px !important;
        text-align: center;
    }
    .main-title {
        font-size: 24px;
        letter-spacing: 2px;
    }

    /* ---- Form inputs full width ---- */
    .form-input {
        font-size: 14px;
        padding: 6px;
    }
    .phone-wrapper {
        flex-wrap: wrap;
        gap: 4px;
    }

    /* ---- Action rows: icon left of text (small) ---- */
    .action-row td {
        display: inline-block;
        vertical-align: top;
    }
    .action-icon-col {
        width: 60px !important;
        display: inline-block;
        padding: 4px !important;
    }
    .action-icon-col img {
        width: 50px;
        height: 50px;
    }
    .action-text {
        width: calc(100% - 70px) !important;
        display: inline-block;
        font-size: 14px;
    }

    /* ---- Divider rows ---- */
    .divide-row h2 {
        font-size: 18px;
    }
    .divide-row p {
        font-size: 14px;
    }

    /* ---- Footer ---- */
    .footer-row td {
        font-size: 13px;
    }
}

/* Print specific styles */
@media print {
    body {
        background: white !important;
    }
    .print-hidden {
        display: none !important;
    }
    @page {
        size: A4 portrait;
        margin: 5mm;
    }
    .container-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-shadow: none !important;
    }
    .form-input {
        border: 1px solid #000 !important;
        background: white !important;
        color: black !important;
        padding: 3px !important;
        font-size: 12px !important;
        height: 22px !important;
    }
    .form-input::placeholder {
        color: transparent;
    }
    .alarm-table td {
        padding: 4px !important;
    }
    .divide-row td {
        padding: 4px !important;
    }
    .main-title { font-size: 24px !important; }
    .col-info { font-size: 11px !important; }
    .label-col { font-size: 13px !important; }
    .action-text { font-size: 12px !important; line-height: 1.2 !important; }
    .action-icon-col img { width: 45px !important; height: 45px !important; }
    .red-divider h2 { font-size: 20px !important; }
    .divide-row h2 { font-size: 16px !important; }
    .footer-row td { padding: 6px !important; font-size: 11px !important; }
    .no-bullet { margin-top: 2px !important; }
    .read-only-text { font-size: 12px !important; line-height: 1.2 !important; }
    .phone-wrapper span { font-size: 11px !important; }
}
