/* solve some issues for rtl Alaa Darory */
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
    text-align: right;
}

/* Custom font */
@font-face {
    font-family: "CairoRegular";
    src: url("{{ asset('fonts/Cairo-Regular.ttf') }}");
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
input,
select,
label,
textarea,
* {
    font-family: "Tajawal" !important;
}

.btn {
    font-weight: 500;
}

.required>label:after {
    content: "*" !important;
    color: red;
    font-size: 1.1em;
}

/* Custom list group */
.list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease-in-out;
    padding: 0.75rem 1rem;
}

.list-group-item:hover {
    /* Light hover background */
    transform: translateX(4px);
    /* Small slide effect */
    border-left: 3px solid #3187af;
}

.list-group-item.active {
    background-color: #3187af;
    color: #fff;
    border-color: #3187af;
}

/* Media queries for responsive tables */
@media only screen and (max-width: 800px) {
    .table>tbody>tr>td:first-child {
        padding-left: 15px !important;
    }

    /* Center the header on mobile */
    .content-header>h1 {
        text-align: center;
        font-size: 1.5rem;
        margin-bottom: 1rem;
        font-weight: 600;
    }

    /* Make table fully responsive */
    table.responsive-table-block,
    table.responsive-table-block thead,
    table.responsive-table-block tbody,
    table.responsive-table-block th,
    table.responsive-table-block td,
    table.responsive-table-block tr {
        display: block;
        width: 100%;
    }

    table.responsive-table-block thead tr {
        display: none
    }

    /* Add rounded card-like rows */
    table.responsive-table-block tr {
        border: none;
        margin-bottom: 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        padding: 0.5rem;
    }

    /* Smooth hover effect */
    table.responsive-table-block tr:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    /* Table cells styling */
    table.responsive-table-block td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding: 0.75rem 1rem;
        white-space: normal;
        text-align: left;
        font-size: 0.95rem;
        color: #333;
    }

    /* Label before content */
    table.responsive-table-block td:before {
        position: absolute;
        top: 0.75rem;
        right: 1rem;
        width: 45%;
        padding-left: 10px;
        white-space: nowrap;
        text-align: right;
        font-weight: 600;
        color: #555;
        content: attr(data-label);
    }

    /* Special cases for cells without labels */
    table.responsive-table-block td.notitle {
        padding: 0.75rem 0.5rem !important;
        text-align: right;
        width: 100%;
    }

    table.responsive-table-block td.notitle-left {
        text-align: left;
    }

    table.responsive-table-block td.notitle-center {
        text-align: center;
    }

    /* Smooth transitions for buttons inside cells */
    table.responsive-table-block td a.btn {
        transition: all 0.2s ease;
    }

    table.responsive-table-block td a.btn:hover {
        transform: scale(1.05);
    }
}


/* Photo Preview */
.photo-preview {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.preview-img {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 1051;
    border-radius: 8px;
    transition: transform 0.2s ease-in-out;
}

.preview-img:hover {
    transform: scale(1.02);
}

/* Disable default browser/Bootstrap focus outline and shadow */
input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    outline: none !important;
    box-shadow: none !important;

    /* apply your theme color */
    /* background-color: #fff; */
    /* keep background clean */
    border-color: #3187af !important;
}

/* Optional: add focus-visible variant if user navigates via keyboard */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.form-control:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 .2rem rgba(49, 135, 175, 0.25) !important;
    /* glow effect */
    border-color: #3187af !important;
}
