.brs-wrapper,
#brs-modal {
    font-family: inherit;
    direction: rtl;
    margin-top: 15px;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.brs-empty {
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
}

.brs-empty p {
    font-size: 18px;
    color: #374151;
    margin-bottom: 25px;
}

#brs-open-modal,
#brs-add-book,
#brs-form button[type="submit"] {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    /* ← جایگزین -webkit-fill-available */
    display: block;
}

button#brs-open-modal {
    width: -webkit-fill-available;
    padding: 10px;
    background: #2563eb;
    color: white;
    border-radius: 12px;
    border-style: none;
}

#brs-open-modal:hover,
#brs-add-book:hover,
#brs-form button[type="submit"]:hover {
    background: #1e40af;
}

#brs-add-book {
    background: #10b981;
    margin-bottom: 12px;
}

#brs-add-book:hover {
    background: #059669;
}

.brs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 25px;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
}

.brs-table thead {
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
}

.brs-table th {
    padding: 16px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.brs-table td {
    padding: 15px 14px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.brs-table tbody tr {
    transition: all .15s ease;
}

.brs-table tbody tr:hover {
    background: #f9fafb;
}

.brs-table tr:last-child td {
    border-bottom: none;
}

.brs-table td:first-child {
    font-weight: 600;
    color: #2563eb;
}

.brs-books-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brs-book-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    display: inline-block;
    width: fit-content;
}

.brs-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.brs-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.brs-status.processing {
    background: #dbeafe;
    color: #1e40af;
}

.brs-status.available {
    background: #dcfce7;
    color: #166534;
}

.brs-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.brs-note-text {
    white-space: pre-line;
    line-height: 1.8;
}

.wp-list-table .brs-books-list {
    gap: 4px;
}

.wp-list-table .brs-book-item {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
}

@media(max-width:768px) {

    .brs-table thead {
        display: none;
    }

    .brs-table,
    .brs-table tbody,
    .brs-table tr,
    .brs-table td {
        display: block;
        width: 100%;
    }

    .brs-table tr {
        margin-bottom: 15px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        overflow: hidden;
    }

    .brs-table td {
        border: none;
        border-bottom: 1px solid #f1f5f9;
        padding: 12px;
    }

    .brs-table td:last-child {
        border-bottom: none;
    }

}

.brs-overlay {
    background: rgba(0, 0, 0, 0.65);
    width: 100%;
    height: 100%;
    position: absolute;
}

@keyframes brsFadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brs-modal-content h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #111827;
    text-align: center;
}

#brs-form input[type="text"],
#brs-form input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

#brs-form input:focus {
    border-color: #2563eb;
    outline: none;
}

.brs-book {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
    padding-top: 40px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    position: relative;
}

.brs-book:first-child {
    padding-top: 15px;
}

.brs-book .brs-field:first-child {
    grid-column: 1 / -1;
}

.brs-book input[name="book_name[]"] {
    grid-column: span 2;
}

#brs-form button[type="submit"] {
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .brs-book {
        grid-template-columns: 1fr;
    }

    .brs-modal-content {
        width: 95%;
        padding: 15px;
        margin: 20px auto;
    }
}

@media (max-width: 600px) {

    .brs-table th,
    .brs-table td {
        font-size: 13px;
        padding: 10px;
    }

    .brs-book {
        grid-template-columns: 1fr;
    }

    .brs-modal-content {
        margin: 40px auto;
    }

}

.brs-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brs-field label {
    display: block;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.brs-required {
    color: #dc2626;
    font-weight: 700;
    margin-right: 3px;
}

.brs-table,
.wrap table.widefat {

    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.06);

}

.brs-table thead,
.wrap table.widefat thead {

    background: #f8fafc;

}

.brs-table th,
.wrap table.widefat th {

    padding: 14px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;

}

.brs-table td,
.wrap table.widefat td {

    padding: 14px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;

}

.brs-table tbody tr:nth-child(even),
.wrap table.widefat tbody tr:nth-child(even) {
    background: #fafafa;
}

.brs-table tbody tr:hover,
.wrap table.widefat tbody tr:hover {

    background: #f1f5f9;
    transition: 0.2s;

}

.wrap table select {

    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-family: inherit;

}

.wrap table .button-primary {

    background: #2563eb;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;

}

.wrap table .button-primary:hover {

    background: #1e40af;

}

@media(max-width:768px) {

    .brs-table th,
    .brs-table td {

        font-size: 12px;
        padding: 10px;

    }

}

.brs-book-item {

    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    background: #fafafa;
    position: relative;

}

.brs-remove-book {
    position: absolute;
    top: 8px;
    left: 10px;
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}


.brs-remove-book:hover {
    background: #dc2626;
}

@media (max-width:768px) {

    .brs-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 10px;
    }

    .brs-table thead th {
        font-size: 12px;
        padding: 10px;
    }

    .brs-table td {
        font-size: 12px;
        padding: 10px;
    }

    .brs-table td br {
        display: none;
    }

}

.brs-table-wrap {
    width: 100%;
    overflow-x: auto;
}

@media (max-width:768px) {

    .brs-table thead {
        display: none;
    }

    .brs-table,
    .brs-table tbody,
    .brs-table tr,
    .brs-table td {
        display: block;
        width: 100%;
    }

    .brs-table tr {
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    }

    .brs-table td {
        border: none;
        padding: 8px 0;
        font-size: 14px;
        position: relative;
    }

    .brs-table td:nth-child(1)::before {
        content: "شناسه:";
        font-weight: 600;
        margin-left: 6px;
    }

    .brs-table td:nth-child(2)::before {
        content: "نام:";
        font-weight: 600;
        margin-left: 6px;
    }

    .brs-table td:nth-child(3)::before {
        content: "کتاب‌ها:";
        font-weight: 600;
        margin-left: 6px;
    }

    .brs-table td:nth-child(4)::before {
        content: "تاریخ:";
        font-weight: 600;
        margin-left: 6px;
    }

    .brs-table td:nth-child(5)::before {
        content: "وضعیت:";
        font-weight: 600;
        margin-left: 6px;
    }

    .brs-table td:nth-child(6)::before {
        content: "توضیحات:";
        font-weight: 600;
        margin-left: 6px;
    }

    .brs-status {
        display: inline-block;
        margin-top: 4px;
    }

}

.brs-public-wrapper,
.brs-track-wrapper {
    max-width: 760px;
    margin: 40px auto;
    font-family: inherit;
}

.brs-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.brs-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.brs-field {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.brs-field label {
    margin-bottom: 6px;
    font-size: 12px;
}

.brs-field input {
    padding: 10px !important;
    border-radius: 6px !important;
    border: 1px solid #ccc !important;
    font-size: 14px !important;
}

.brs-btn-primary {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.brs-btn-primary:hover {
    background: #1d4ed8;
}

.brs-track-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-direction: column;
}

.brs-track-search input {
    flex: 1 !important;
    padding: 10px !important;
    border-radius: 6px !important;
    border: 1px solid #ccc !important;
}

.brs-status-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.brs-loading {
    text-align: center;
    padding: 15px;
}

.brs-empty {
    text-align: center;
    padding: 15px;
    color: #666;
}

.brs-field input {
    font-family: var(--font-family, inherit);
}

.brs-track-search input {
    font-family: var(--font-family, inherit);
}

.brs-no-result-box {
    text-align: center;
    padding: 40px;
    margin: 30px auto;
    max-width: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.brs-search-page-box {
    max-width: 640px;
}

.brs-request-btn {
    margin-top: 15px;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: .3s;
}

.brs-request-btn:hover {
    background: #1d4ed8;
}

#brs-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9947483647;
}

.brs-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.brs-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 520px;
    margin: 40px auto;
    padding: 25px;
    border-radius: 12px;
    z-index: 99;
    height: auto;
    max-height: 85vh;
    overflow-y: auto;
    animation: brsFadeUp 0.3s ease;
}

.brs-close {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 22px;
    cursor: pointer;
}

@media (max-width:600px) {

    .brs-modal-content {
        width: 95%;
        margin: 40px auto;
        padding: 20px;
        height: 50%;
    }

}

.brs-success-message {
    background: #e8f7ee;
    border: 1px solid #4caf50;
    color: #2e7d32;
    padding: 14px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

.brs-search-btn {
    opacity: 0;
    transform: translateY(-6px);
    animation: brsFadeIn 0.45s ease-out forwards;
}

.brs-search-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    box-shadow: 0 0 0 0 rgba(44, 123, 229, 0.5);
    animation: brsPulse 1.8s ease-out infinite;
    pointer-events: none;
}

.brs-request-btn {
    opacity: 0;
    transform: translateY(-6px);
    animation: brsFadeIn 0.45s ease-out forwards;
}

.brs-request-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    box-shadow: 0 0 0 0 rgba(44, 123, 229, 0.5);
    animation: brsPulse 1.8s ease-out infinite;
    pointer-events: none;
}

@keyframes brsPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 123, 229, .5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(44, 123, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(44, 123, 229, 0);
    }
}

.brs-success-msg {
    background: #e8f7ee;
    color: #1e7e34;
    padding: 10px;
    border-radius: 6px;
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    animation: brsFadeIn .3s ease-out;
}

@keyframes brsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brs-track-btn {
    margin-top: 10px;
    display: inline-block;
    text-decoration: none !important;
}

.brs-error {
    border: 2px solid #e53935 !important;
    background-color: #fff5f5 !important;
}

.brs-error-text {
    color: #e53935;
    font-size: 13px;
    margin-top: 4px;
}

@keyframes brs-shake {
    0% {
        transform: translateX(0)
    }

    25% {
        transform: translateX(-4px)
    }

    50% {
        transform: translateX(4px)
    }

    75% {
        transform: translateX(-4px)
    }

    100% {
        transform: translateX(0)
    }
}

.brs-shake {
    animation: brs-shake 0.35s;
}

@media (max-width: 768px) {

    .brs-track-wrapper .brs-table td:nth-child(1)::before {
        content: "شناسه:";
        font-weight: 600;
        margin-left: 6px;
    }

    .brs-track-wrapper .brs-table td:nth-child(2)::before {
        content: "کتاب‌ها:";
        font-weight: 600;
        margin-left: 6px;
    }

    .brs-track-wrapper .brs-table td:nth-child(3)::before {
        content: "وضعیت:";
        font-weight: 600;
        margin-left: 6px;
    }

    .brs-track-wrapper .brs-table td:nth-child(4)::before {
        content: "توضیحات:";
        font-weight: 600;
        margin-left: 6px;
    }

}

.brs-track-wrapper .brs-status {
    display: inline-block;
}

#brs-modal-search {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#brs-modal-search .brs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

#brs-modal-search .brs-modal-content {
    position: relative;
    z-index: 999999;
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    animation: brs-pop-in 0.25s ease;
}

#brs-modal-search .brs-close {
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

#brs-modal-search .brs-close:hover {
    color: #333;
}

@keyframes brs-pop-in {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.byno-search-suggestions .brs-search-btn,
#byno-mobile-search-suggestions .brs-search-btn,
#byno-desktop-search-suggestions .brs-search-btn {
    display: block !important;
    margin: 8px 10px !important;
    padding: 10px 14px !important;
    background: #2c7be5 !important;
    color: #fff !important;
    text-align: center !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: background 0.2s, transform 0.15s !important;
    border: none !important;
    box-sizing: border-box !important;
    width: calc(100% - 20px) !important;
    position: relative;
}

.byno-search-suggestions .brs-search-btn:hover,
#byno-mobile-search-suggestions .brs-search-btn:hover,
#byno-desktop-search-suggestions .brs-search-btn:hover {
    background: #1a68d1 !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}
