/* Business account schedules, story admin cards and modals. */
.tb-account-tab {
    direction: rtl;
    padding: 26px 0 34px;
}

.tb-tab-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin: 0 0 22px;
}

.tb-tab-head h2 {
    color: #003b5c;
    font-size: 28px;
    font-weight: 800;
    margin: 0;
}

.tb-tab-head p {
    margin: 7px 0 0;
    color: #667085;
    font-size: 15px;
}

.tb-open-modal,
.tb-open-story-modal,
.tb-modal-actions button[type="submit"] {
    background: #e94666;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: 700;
    cursor: pointer;
}

.tb-message {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ecfdf3;
    color: #166534;
    font-weight: 700;
}

.tb-schedules-list-wrap {
    width: 100%;
}

.tb-schedules-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tb-stories-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tb-schedule-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 190px;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid #e7e7e7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 59, 92, .06);
    direction: rtl;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.tb-story-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid #e7e7e7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 59, 92, .06);
    direction: rtl;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.tb-schedule-card:hover {
    transform: translateY(-1px);
    border-color: #d6e0e7;
    box-shadow: 0 14px 34px rgba(0, 59, 92, .11);
}

.tb-story-card:hover {
    transform: translateY(-1px);
    border-color: #d6e0e7;
    box-shadow: 0 14px 34px rgba(0, 59, 92, .11);
}

.tb-schedule-image {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    background: #f2f4f7;
    flex: 0 0 auto;
}

.tb-story-preview-wrap {
    width: 118px;
    height: 118px;
    border-radius: 18px;
    overflow: hidden;
    background: #f2f4f7;
}

.tb-story-preview {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border: 1px solid #d0d5dd;
    border-radius: 18px;
    background: #f2f4f7;
}

.tb-story-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.tb-story-link-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: #003b5c;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
}

.tb-schedule-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.tb-schedule-main {
    width: 100%;
    min-width: 0;
}

.tb-story-main {
    width: 100%;
    min-width: 0;
}

.tb-schedule-title {
    color: #003b5c;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.tb-story-title {
    color: #003b5c;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.tb-schedule-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 5px;
    color: #475467;
    font-size: 14px;
    line-height: 1.5;
}

.tb-story-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 5px;
    color: #475467;
    font-size: 14px;
    line-height: 1.5;
}

.tb-schedule-meta-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
}

.tb-story-meta-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
}

.tb-schedule-tags {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.tb-story-tags {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.tb-story-type {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 11px;
    background: #eef6fb;
    color: #003b5c;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.tb-story-type.video {
    background: #fff0f3;
    color: #e94666;
}

.tb-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 11px;
    background: #f2f4f7;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tb-category.empty {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.tb-empty {
    text-align: center;
    color: #667085;
    padding: 28px;
    border: 1px dashed #d0d5dd;
    border-radius: 16px;
    background: #fff;
}

.tb-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tb-status.pending {
    background: #fff4d6;
    color: #9a6a00;
}

.tb-status.publish {
    background: #dcfce7;
    color: #166534;
}

.tb-status.draft {
    background: #eef2f6;
    color: #475467;
}

.tb-story-status {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}

.tb-schedule-actions {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-shrink: 0;
}

.tb-story-actions {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-shrink: 0;
}

.tb-edit-btn {
    border: 1px solid #e94666;
    background: #fff;
    color: #e94666;
    border-radius: 12px;
    padding: 9px 18px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.tb-edit-story-btn {
    border: 1px solid #e94666;
    background: #fff;
    color: #e94666;
    border-radius: 12px;
    padding: 9px 18px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.tb-edit-btn:hover {
    background: #e94666;
    color: #fff;
}

.tb-edit-story-btn:hover {
    background: #e94666;
    color: #fff;
}

.tb-schedule-dates-list {
    width: 190px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f4f8fb;
    color: #003b5c;
    font-weight: 700;
}

.tb-date-line,
.tb-date-empty,
.tb-date-more {
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
}

.tb-date-empty {
    color: #667085;
}

.tb-date-more {
    margin-top: 2px;
    color: #e94666;
}

.tb-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.tb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .56);
}

.tb-modal-box {
    position: relative;
    width: calc(100% - 28px);
    max-width: 760px;
    max-height: 90vh;
    overflow: auto;
    margin: 5vh auto;
    background: #fff;
    border-radius: 18px;
    padding: 26px;
    direction: rtl;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.tb-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef2f6;
}

.tb-modal-head h3 {
    margin: 0;
    color: #003b5c;
    font-size: 22px;
    font-weight: 800;
}

.tb-close-modal,
.tb-close-story-modal {
    border: 0;
    background: transparent;
    color: #003b5c;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.tb-schedule-form label,
.tb-story-form label {
    display: block;
    margin: 16px 0 7px;
    font-weight: 700;
    color: #003b5c;
}

.tb-schedule-form .xhbp-input,
.tb-story-form .xhbp-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    padding: 9px 11px;
}

.tb-char-counter {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
}

.tb-image-field {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 24px;
    direction: rtl;
    margin: 18px 0 12px;
}

.tb-story-media-field {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 24px;
    direction: rtl;
    margin: 18px 0 12px;
}

.tb-image-info {
    flex: 1;
    text-align: right;
}

.tb-image-info h4 {
    margin: 0 0 8px;
    color: #003b5c;
    font-size: 18px;
    font-weight: 800;
}

.tb-image-info strong {
    display: block;
    margin-bottom: 4px;
    color: #003b5c;
}

.tb-image-info p {
    margin: 0;
    color: #667085;
}

.tb-image-preview-box {
    position: relative;
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    flex-shrink: 0;
}

.tb-story-preview-box {
    position: relative;
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    flex-shrink: 0;
}

.tb-image-preview {
    width: 150px;
    height: 150px;
    display: block;
    object-fit: cover;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #f2f4f7;
}

.tb-image-upload-btn {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e94666;
    border-radius: 50%;
    background: #e94666;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(233, 70, 102, .28);
}

.tb-story-media-upload-btn {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e94666;
    border-radius: 50%;
    background: #e94666;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(233, 70, 102, .28);
}

.tb-image-upload-btn:hover {
    background: #d93657;
}

.tb-story-media-upload-btn:hover {
    background: #d93657;
}

.tb-story-remove-media-btn {
    margin-top: 10px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: 9px 14px;
    background: #fff;
    color: #344054;
    font-weight: 700;
    cursor: pointer;
}

.tb-story-upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.tb-story-upload-progress.d-none {
    display: none;
}

.tb-story-upload-progress-track {
    position: relative;
    flex: 1;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4e7ec;
}

.tb-story-upload-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #e94666;
    transition: width .18s ease;
}

.tb-story-upload-progress-text {
    min-width: 42px;
    color: #003b5c;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}

.tb-story-message {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ecfdf3;
    color: #166534;
    font-weight: 700;
}

.ftb-stories-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 12px 2px 16px;
    scrollbar-width: thin;
}

.ftb-story-avatar {
    width: 86px;
    flex: 0 0 86px;
    border: 0;
    background: transparent;
    color: #003b5c;
    cursor: pointer;
    text-align: center;
}

.ftb-story-avatar img,
.ftb-story-avatar video,
.ftb-story-video-fallback {
    width: 76px;
    height: 76px;
    display: block;
    margin: 0 auto 7px;
    object-fit: cover;
    border: 3px solid #e94666;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(0, 59, 92, .12);
}

.ftb-story-video-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff0f3;
    color: #e94666;
    font-size: 13px;
    font-weight: 800;
}

.ftb-story-avatar span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
}

.ftb-story-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(0, 0, 0, .88);
}

.ftb-story-lightbox.d-none {
    display: none;
}

.ftb-story-lightbox-media {
    max-width: min(92vw, 520px);
    max-height: 78vh;
}

.ftb-story-lightbox-media img,
.ftb-story-lightbox-media video {
    max-width: 100%;
    max-height: 78vh;
    display: block;
    border-radius: 18px;
    object-fit: contain;
    background: #000;
}

.ftb-story-lightbox-close {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #003b5c;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.ftb-story-lightbox-caption {
    position: absolute;
    right: 28px;
    left: 28px;
    bottom: 22px;
    color: #fff;
    text-align: center;
}

.ftb-story-lightbox-caption strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
}

.ftb-story-lightbox-caption p {
    max-width: 520px;
    margin: 6px auto;
    color: rgba(255, 255, 255, .84);
}

.ftb-story-lightbox-caption a {
    display: inline-flex;
    margin-top: 4px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #e94666;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
}

.ftb-story-video-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    min-height: 54px;
    padding: 14px 22px;
    border-radius: 999px;
    background: #e94666;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
}

.tb-repeater-items {
    margin-top: 12px;
}

.tb-repeater-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 40px;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.tb-repeater-item .tb-remove-row {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 9px;
    background: #f2f4f7;
    color: #475467;
    font-size: 22px;
    cursor: pointer;
}

.tb-add-row {
    margin-top: 12px;
    border: 1px solid #003b5c;
    background: #fff;
    color: #003b5c;
    border-radius: 9px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.tb-modal-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 24px;
}

.tb-modal-actions .tb-close-modal,
.tb-modal-actions .tb-close-story-modal {
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: 10px 18px;
    color: #344054;
    font-size: 15px;
}

@media (max-width: 760px) {
    .tb-tab-head {
        align-items: stretch;
        flex-direction: column;
    }

    .tb-open-modal,
    .tb-open-story-modal {
        width: 100%;
    }

    .tb-schedule-card,
    .tb-story-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
    }

    .tb-schedule-image,
    .tb-story-preview-wrap {
        width: 100%;
        height: 180px;
    }

    .tb-schedule-meta-row,
    .tb-story-meta-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .tb-schedule-actions,
    .tb-story-actions {
        justify-content: stretch;
    }

    .tb-edit-btn,
    .tb-edit-story-btn {
        width: 100%;
    }

    .tb-schedule-dates-list {
        width: 100%;
    }

    .tb-modal-box {
        margin: 3vh auto;
        padding: 20px;
    }

    .tb-image-field,
    .tb-story-media-field {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .tb-image-info {
        width: 100%;
    }

    .tb-repeater-item {
        grid-template-columns: 1fr;
    }

    .tb-repeater-item .tb-remove-row {
        width: 100%;
    }
}

