/* ============================================================
 * ACE SPECIAL CONSTRUCTION
 * File: ace_special_construction.css
 * ============================================================ */


/* ------------------------------------------------------------
 * 1. PAGE
 * ------------------------------------------------------------ */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 20px;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    background: #f4f6f8;
    color: #222;
    line-height: 1.5;
}


/* ------------------------------------------------------------
 * 2. MAIN CONTAINER
 * ------------------------------------------------------------ */

.ace-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}


/* ------------------------------------------------------------
 * 3. PAGE TITLE
 * ------------------------------------------------------------ */

h1,
h2,
h3 {
    margin-top: 0;
    color: #1f2937;
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

h2 {
    font-size: 22px;
    margin-bottom: 15px;
}

h3 {
    font-size: 18px;
}


/* ------------------------------------------------------------
 * 4. FILTER / CONTROL AREA
 * ------------------------------------------------------------ */

.ace-controls,
.ace-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;

    padding: 16px;
    margin-bottom: 20px;

    background: #ffffff;
    border: 1px solid #d9dee5;
    border-radius: 8px;
}


.ace-control,
.ace-filter {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


.ace-control label,
.ace-filter label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}


select,
input[type="text"],
input[type="number"] {
    min-height: 38px;
    padding: 7px 10px;

    font-size: 14px;

    color: #222;
    background: #fff;

    border: 1px solid #c7ced8;
    border-radius: 5px;

    outline: none;
}


select:focus,
input[type="text"]:focus,
input[type="number"]:focus {
    border-color: #4f7cac;
    box-shadow: 0 0 0 2px rgba(79, 124, 172, 0.15);
}


/* ------------------------------------------------------------
 * 5. BUTTONS
 * ------------------------------------------------------------ */

button,
.ace-button {
    display: inline-block;

    min-height: 38px;
    padding: 8px 14px;

    border: 1px solid #4f7cac;
    border-radius: 5px;

    background: #4f7cac;
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    text-decoration: none;
}


button:hover,
.ace-button:hover {
    opacity: 0.9;
}


/* ------------------------------------------------------------
 * 6. FORM SECTION
 * ------------------------------------------------------------ */

.ace-form-section {
    margin-bottom: 28px;
    padding: 18px;

    background: #fff;
    border: 1px solid #d9dee5;
    border-radius: 8px;
}


.ace-form-title {
    margin-bottom: 14px;
    padding-bottom: 9px;

    border-bottom: 2px solid #e7ebef;

    font-size: 20px;
    font-weight: 700;
    color: #263238;
}


/* ------------------------------------------------------------
 * 7. TABLE WRAPPER
 * ------------------------------------------------------------ */

.ace-table-wrapper {
    width: 100%;
    overflow-x: auto;

    background: #fff;
    border-radius: 6px;
}


/* ------------------------------------------------------------
 * 8. MAIN TABLE
 * ------------------------------------------------------------ */

table {
    width: 100%;
    min-width: 900px;

    border-collapse: collapse;
    border-spacing: 0;

    background: #fff;
}


thead {
    background: #edf1f5;
}


th {
    padding: 11px 10px;

    text-align: left;
    vertical-align: middle;

    border: 1px solid #d3d9e0;

    font-size: 13px;
    font-weight: 700;

    color: #28323c;
}


td {
    padding: 10px;

    vertical-align: middle;

    border: 1px solid #dde2e7;

    font-size: 14px;
}


tbody tr:nth-child(even) {
    background: #fafbfc;
}


tbody tr:hover {
    background: #f0f5fa;
}


/* ------------------------------------------------------------
 * 9. RECORD NUMBER
 * ------------------------------------------------------------ */

td:first-child,
th:first-child {
    width: 60px;
    text-align: center;
}


/* ------------------------------------------------------------
 * 10. ENGLISH CONSTRUCTION
 * ------------------------------------------------------------ */

.ace-english,
.english-sentence {
    line-height: 1.55;
    color: #20252b;
}


/* ------------------------------------------------------------
 * 11. ARABIC COLUMN
 * ------------------------------------------------------------ */

.arabic-heading {
    text-align: center;
}


.ace-arabic,
.arabic-sentence,
td.arabic {
    direction: rtl;
    text-align: center;

    font-family:
        "Traditional Arabic",
        "Noto Naskh Arabic",
        "Amiri",
        "Scheherazade New",
        serif;

    font-size: 27px;
    line-height: 1.8;

    white-space: nowrap;

    color: #111;
}


/* ------------------------------------------------------------
 * 12. BASIC TENSE COLUMN
 * ------------------------------------------------------------ */

.ace-tense,
.basic-tense {
    min-width: 175px;

    font-size: 13px;
    font-weight: 600;

    color: #374151;
}


.ace-tense-number {
    display: inline-block;

    min-width: 26px;

    margin-right: 5px;
    padding: 2px 6px;

    text-align: center;

    border-radius: 4px;

    background: #e8eef5;
    color: #24476b;

    font-weight: 700;
}


/* ------------------------------------------------------------
 * 13. TENSE LABEL
 * ------------------------------------------------------------ */

.ace-tense-title {
    font-weight: 600;
    color: #374151;
}


/* ------------------------------------------------------------
 * 14. TENSE BADGES
 * ------------------------------------------------------------ */

.tense-badge {
    display: inline-block;

    padding: 4px 8px;

    border: 1px solid #ccd5df;
    border-radius: 12px;

    background: #f5f7f9;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}


/* ------------------------------------------------------------
 * 15. ACTIVE / PASSIVE DISTINCTION
 * ------------------------------------------------------------ */

.tense-active {
    background: #eef7ee;
    border-color: #c8dfc8;
}


.tense-passive {
    background: #f7f0ee;
    border-color: #dfcec8;
}


/* ------------------------------------------------------------
 * 16. PERFECT / IMPERFECT / MOOD CLASSES
 * ------------------------------------------------------------ */

.tense-perfect {
    font-weight: 700;
}


.tense-imperfect {
    font-weight: 700;
}


.tense-subjunctive {
    font-style: italic;
}


.tense-jussive {
    font-style: italic;
}


.tense-emphatic {
    font-weight: 700;
}


.tense-imperative {
    font-weight: 700;
}


.tense-prohibitive {
    font-weight: 700;
}


/* ------------------------------------------------------------
 * 17. EMPTY / UNKNOWN TENSE
 * ------------------------------------------------------------ */

.ace-tense-empty,
.tense-unknown {
    color: #9ca3af;
    font-weight: normal;
}


/* ------------------------------------------------------------
 * 18. ARABIC VERB HIGHLIGHTING
 * ------------------------------------------------------------ */

.ace-main-verb {
    font-weight: 700;
}


.ace-verb-prefix {
    color: #24853f;
}


.ace-verb-stem {
    color: #111;
}


.ace-verb-suffix {
    color: #c66a18;
}


/* ------------------------------------------------------------
 * 19. SMALL INFORMATION LINE
 * ------------------------------------------------------------ */

.ace-info {
    margin: 8px 0 14px;

    font-size: 13px;
    color: #6b7280;
}


.ace-info strong {
    color: #374151;
}


/* ------------------------------------------------------------
 * 20. RESULTS COUNT
 * ------------------------------------------------------------ */

.ace-result-count {
    display: inline-block;

    margin-bottom: 10px;
    padding: 5px 9px;

    background: #eef1f4;
    border-radius: 5px;

    font-size: 13px;
    font-weight: 600;

    color: #4b5563;
}


/* ------------------------------------------------------------
 * 21. NO RESULTS MESSAGE
 * ------------------------------------------------------------ */

.ace-no-results {
    padding: 20px;

    text-align: center;

    background: #fff;
    border: 1px dashed #c9d0d8;
    border-radius: 6px;

    color: #777;
}


/* ------------------------------------------------------------
 * 22. LINKS
 * ------------------------------------------------------------ */

a {
    color: #315f8f;
    text-decoration: none;
}


a:hover {
    text-decoration: underline;
}


/* ------------------------------------------------------------
 * 23. CODE / DEBUG TEXT
 * ------------------------------------------------------------ */

code,
.ace-code {
    padding: 2px 5px;

    background: #f0f2f4;

    border-radius: 3px;

    font-family:
        Consolas,
        Monaco,
        "Courier New",
        monospace;

    font-size: 12px;
}


/* ------------------------------------------------------------
 * 24. SELECTED FILTER INFORMATION
 * ------------------------------------------------------------ */

.ace-selected-filter {
    margin-bottom: 14px;
    padding: 9px 12px;

    border-left: 4px solid #4f7cac;

    background: #f2f6fa;

    font-size: 14px;

    color: #374151;
}


/* ------------------------------------------------------------
 * 25. FORM DIVIDER
 * ------------------------------------------------------------ */

.ace-divider {
    height: 1px;

    margin: 22px 0;

    background: #dfe3e8;

    border: 0;
}


/* ------------------------------------------------------------
 * 26. STICKY TABLE HEADER
 * ------------------------------------------------------------ */

.ace-table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 5;
}


/* ------------------------------------------------------------
 * 27. MOBILE / SMALL SCREEN
 * ------------------------------------------------------------ */

@media (max-width: 900px) {

    body {
        padding: 10px;
    }

    .ace-controls,
    .ace-filter-bar {
        align-items: stretch;
    }

    .ace-control,
    .ace-filter {
        width: 100%;
    }

    select,
    input[type="text"],
    input[type="number"],
    button,
    .ace-button {
        width: 100%;
    }

    .ace-form-section {
        padding: 10px;
    }

    .ace-arabic,
    .arabic-sentence,
    td.arabic {
        font-size: 24px;
    }
}


/* ------------------------------------------------------------
 * 28. VERY SMALL SCREEN
 * ------------------------------------------------------------ */

@media (max-width: 600px) {

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 19px;
    }

    th,
    td {
        padding: 8px;
    }

    .ace-arabic,
    .arabic-sentence,
    td.arabic {
        font-size: 22px;
    }
}


/* ------------------------------------------------------------
 * 29. PRINT
 * ------------------------------------------------------------ */

@media print {

    body {
        padding: 0;
        background: #fff;
    }

    .ace-controls,
    .ace-filter-bar,
    button,
    .ace-button {
        display: none !important;
    }

    .ace-form-section {
        border: 0;
        padding: 0;
    }

    table {
        min-width: 0;
    }

    thead {
        display: table-header-group;
    }

    tbody tr {
        break-inside: avoid;
    }
}