﻿
.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination ul {
    list-style: none;
    padding: 0;
    display: inline-flex;
    gap: 8px;
}

.pagination li {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

    .pagination li:hover {
        background-color: #007ac3;
        color: white;
    }

    .pagination li.active {
        background-color: #007ac3;
        color: white;
    }

    .pagination li.arrow {
        font-size: 18px;
        background-color: transparent;
        color: #007ac3;
    }

    .pagination li.dots {
        pointer-events: none;
        background-color: transparent;
        color: #999;
        cursor: default;
    }

/* Base typography (Arabic-friendly) */
html[dir="rtl"] body {
    font-family: "Amiri", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}


/* Hero/title */
.hero .opinions-title {
    font-size: clamp(22px, 5vw, 40px) !important; /* scales down on phones */
    margin: 0 0 12px 0;
    text-align: center;
}

/* Form card */
.opinions-form-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Grid rows: 3 cols → 2 cols (tablet) → 1 col (phone) */
.form-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
    margin-top: 18px;
}

@media (max-width: 992px) {
    .form-row {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Form controls */
.form-group label {
    font-size: 16px !important;
    margin-bottom: 6px;
    display: block;
}

.type-dropdown,
.form-group input[type="text"],
.flat-date {
    width: 100%;
    font-size: 16px !important;
    padding: 10px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    min-height: 42px;
}

/* Radio stacks nicely on mobile */
.radio-container {
    gap: 8px;
}

.radio-horizontal {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.radio-item span {
    font-size: 15px !important;
}

/* Submit button */
.submit-button {
    background: #007ac3;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    min-width: 180px;
    font-weight: 700;
    cursor: pointer;
}

    .submit-button:hover {
        background: #0063a1;
    }

@media (max-width: 600px) {
    .form-group-center {
        width: 100%;
    }

    .submit-button {
        width: 100%;
        min-width: 0;
    }
}

/* Turnstile centering */
.cf-turnstile {
    display: inline-block;
}

.h33 .cf-turnstile {
    display: block;
    margin-inline: auto;
}

/* Results table: make it scroll on small screens */
.opinions-results-table {
    width: 100%;
    border-collapse: collapse;
}

    .opinions-results-table th,
    .opinions-results-table td {
        padding: 10px;
        border-bottom: 1px solid #eee;
        vertical-align: top;
        word-break: break-word; /* avoid overflow in Arabic text */
    }

.opinions-results-wrap {
    overflow-x: auto;
}

/* Optional: convert table to "cards" on very small screens */
@media (max-width: 600px) {
    table.opinions-results-table thead {
        display: none;
    }

    table.opinions-results-table,
    table.opinions-results-table tbody,
    table.opinions-results-table tr,
    table.opinions-results-table td {
        display: block;
        width: 100%;
    }

        table.opinions-results-table tr {
            background: #fff;
            margin: 0 0 12px 0;
            border-radius: 10px;
            box-shadow: 0 4px 14px rgba(0,0,0,.05);
            padding: 8px 10px;
        }

        table.opinions-results-table td {
            border: 0;
            padding: 6px 0;
        }
            /* Labels via nth-child (Arabic headers) */
            table.opinions-results-table td:nth-child(1)::before {
                content: "العدد: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(2)::before {
                content: "الموضوع الرئيسي: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(3)::before {
                content: "الموضوع الفرعي: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(4)::before {
                content: "النوع: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(5)::before {
                content: "العنوان: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(6)::before {
                content: "الرقم: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(7)::before {
                content: "التاريخ: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(8)::before {
                content: "الجهة المرسلة: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(9)::before {
                content: "الجهة المرسل إليها: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(10)::before {
                content: "تفاصيل: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(11)::before {
                content: "الخلاصة: ";
                font-weight: 700;
            }

            table.opinions-results-table td:nth-child(12)::before {
                content: "تحميل: ";
                font-weight: 700;
            }
}

/* Pagination: wrap & shrink on phones */
.pagination {
    text-align: center;
    margin-top: 20px;
}

    .pagination ul {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .pagination li {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: #f0f0f0;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-weight: 700;
        transition: background .3s;
    }

        .pagination li:hover,
        .pagination li.active {
            background-color: #007ac3;
            color: #fff;
        }

        .pagination li.arrow {
            background: transparent;
            color: #007ac3;
        }

        .pagination li.dots {
            background: transparent;
            color: #999;
            pointer-events: none;
        }

@media (max-width: 480px) {
    .pagination li {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .pagination ul {
        gap: 4px;
    }
    /* Optional: hide some dots on very small screens */
    .pagination li.dots {
        display: none;
    }
}

/* Calendar icon padding (so it doesn’t crowd text on phones) */
.flat-date {
    background-position: right 10px center;
    background-size: 20px 20px;
    padding-inline-end: 40px;
}

@media (max-width:600px) {
    table.opinions-results-table td::before {
        display: block;
        margin-bottom: 6px;
        color: #666;
        font-weight: 700;
        text-align: start; /* RTL-friendly */
    }
    /* Center the content of these two cells */
    table.opinions-results-table td.td-title,
    table.opinions-results-table td.td-details {
        text-align: center !important; /* overrides inline justify on title */
    }
        /* If التفاصيل contains an icon/link, center that element too */
        table.opinions-results-table td.td-details a,
        table.opinions-results-table td.td-details i,
        table.opinions-results-table td.td-details svg,
        table.opinions-results-table td.td-details img {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1; /* avoids visual vertical offset */
            vertical-align: middle;
        }
}

@media (max-width:600px) {
    table.opinions-results-table td::before {
        display: block;
        margin-bottom: 6px;
        text-align: center; /* ⬅️ center the title */
        font-weight: 700; /* same weight for all */
        font-size: 17px; /* match "العدد" size (tweak if you use 16/18) */
        line-height: 1.2;
        color: inherit; /* keep your theme color */
    }
}
