/* =============================================================================
   OTC Public / Frontend Styles — RTL, Responsive, Persian
   ============================================================================= */

/* ── Base ─────────────────────────────────────────────────────────── */
.otc-calendar-wrap {
    direction: rtl;
    font-family: 'Tahoma', 'Vazirmatn', 'Arial', sans-serif;
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.otc-calendar-header {
    padding: 24px 0 16px;
    border-bottom: 2px solid #ecf0f1;
    margin-bottom: 20px;
}

.otc-calendar-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a252f;
    margin: 0 0 6px 0;
}

.otc-calendar-desc {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

/* ── View Tabs ────────────────────────────────────────────────────── */
.otc-view-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.otc-view-btn {
    padding: 8px 20px;
    border: 2px solid #dce1e7;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: #555;
    transition: all .2s;
}

.otc-view-btn:hover,
.otc-view-btn.active {
    border-color: #3498db;
    background: #3498db;
    color: #fff;
}

/* ── Filters ──────────────────────────────────────────────────────── */
.otc-filters {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.otc-filter-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.otc-filter-select,
.otc-filter-search {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: #2c3e50;
    flex: 1;
    min-width: 130px;
    max-width: 200px;
    box-sizing: border-box;
}

.otc-filter-search {
    max-width: 240px;
}

.otc-filter-select:focus,
.otc-filter-search:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,.2);
}

.otc-filter-btn {
    padding: 8px 20px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: background .2s;
}

.otc-filter-btn:hover {
    background: #2980b9;
}

.otc-filter-clear {
    font-size: 12px;
    color: #e74c3c;
    text-decoration: none;
    padding: 4px 8px;
    white-space: nowrap;
}

.otc-filter-clear:hover {
    text-decoration: underline;
}

/* ── Course Card ──────────────────────────────────────────────────── */
.otc-course-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.otc-course-card {
    background: #fff;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}

.otc-course-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

.otc-card-stripe {
    width: 5px;
    flex-shrink: 0;
    background: #3498db;
}

.otc-card-body {
    flex: 1;
    padding: 16px 20px;
}

.otc-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.otc-course-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a252f;
    margin: 0;
    flex: 1;
}

.otc-course-title a {
    color: inherit;
    text-decoration: none;
}

.otc-course-title a:hover {
    color: #3498db;
}

/* ── Badges ───────────────────────────────────────────────────────── */
.otc-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.otc-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.otc-badge-type {
    color: #fff;
    background: #3498db;
}

.otc-badge-status {
    background: #ecf0f1;
    color: #555;
}

.otc-status-scheduled   { background: #dbeafe; color: #1e40af; }
.otc-status-in-progress { background: #fef3c7; color: #92400e; }
.otc-status-completed   { background: #d1fae5; color: #065f46; }
.otc-status-cancelled   { background: #fee2e2; color: #991b1b; }

/* ── Card Meta ────────────────────────────────────────────────────── */
.otc-card-meta {
    display: flex;
    gap: 12px 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #555;
}

.otc-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.otc-meta-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.otc-full-badge {
    display: inline-block;
    background: #fee2e2;
    color: #991b1b;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 4px;
}

/* ── Toggle Detail ────────────────────────────────────────────────── */
.otc-toggle-detail {
    background: none;
    border: none;
    color: #3498db;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 0 0;
    display: block;
    transition: color .2s;
}

.otc-toggle-detail:hover {
    color: #2980b9;
}

.otc-card-detail {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 10px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

.otc-detail-excerpt {
    margin: 0;
}

/* ── No Results ───────────────────────────────────────────────────── */
.otc-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dce1e7;
}

/* ── Pagination ───────────────────────────────────────────────────── */
.otc-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 24px 0 8px;
    flex-wrap: wrap;
}

.otc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dce1e7;
    border-radius: 6px;
    text-decoration: none;
    color: #3498db;
    font-size: 14px;
    transition: all .2s;
}

.otc-pagination .page-numbers.current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.otc-pagination .page-numbers:hover:not(.current) {
    background: #ebf5fb;
}

/* ── Monthly View ─────────────────────────────────────────────────── */
.otc-monthly-view {
    background: #fff;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.otc-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8ecef;
}

.otc-month-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a252f;
    margin: 0;
}

.otc-month-prev,
.otc-month-next {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid #3498db;
    border-radius: 4px;
    transition: all .2s;
}

.otc-month-prev:hover,
.otc-month-next:hover {
    background: #3498db;
    color: #fff;
}

.otc-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e8ecef;
    padding: 1px;
}

.otc-day-header {
    background: #f0f4f8;
    text-align: center;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 700;
    color: #555;
}

.otc-day-cell {
    background: #fff;
    min-height: 80px;
    padding: 6px;
    position: relative;
    vertical-align: top;
}

.otc-day-cell.otc-day-empty {
    background: #fbfbfb;
}

.otc-day-cell.otc-today .otc-day-number {
    background: #3498db;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.otc-day-cell.otc-has-courses {
    background: #f0f8ff;
}

.otc-day-number {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    display: block;
    text-align: center;
    margin-bottom: 4px;
}

.otc-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.otc-monthly-event {
    display: block;
    font-size: 10px;
    color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: opacity .2s;
}

.otc-monthly-event:hover {
    opacity: .85;
    color: #fff;
}

.otc-month-list-title {
    font-size: 16px;
    font-weight: 700;
    padding: 16px 20px 8px;
    margin: 0;
    border-top: 1px solid #e8ecef;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .otc-calendar-title {
        font-size: 20px;
    }

    .otc-filter-grid {
        flex-direction: column;
    }

    .otc-filter-select,
    .otc-filter-search,
    .otc-filter-btn {
        width: 100%;
        max-width: none;
    }

    .otc-card-top {
        flex-direction: column;
    }

    .otc-card-meta {
        flex-direction: column;
        gap: 8px;
    }

    .otc-month-grid {
        font-size: 11px;
    }

    .otc-day-cell {
        min-height: 55px;
        padding: 3px;
    }

    .otc-monthly-event {
        display: none; /* Too small to show on mobile */
    }

    .otc-day-cell.otc-has-courses {
        border-bottom: 3px solid #3498db;
    }
}

@media (max-width: 480px) {
    .otc-view-tabs {
        flex-direction: column;
    }

    .otc-course-card {
        flex-direction: column;
    }

    .otc-card-stripe {
        width: 100%;
        height: 4px;
    }
}

/* =============================================================================
   Phase 2 — Suggestion & Feedback Forms
   ============================================================================= */

/* ── Shared form wrap ──────────────────────────────────────────────── */
.otc-form-wrap {
    direction: rtl;
    font-family: 'Tahoma', 'Vazirmatn', 'Arial', sans-serif;
    font-size: 14px;
    color: #2c3e50;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 28px 24px;
    max-width: 720px;
    margin: 24px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.otc-form-title {
    margin: 0 0 16px;
    font-size: 20px;
    color: #1a3f6f;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.otc-form-title small {
    font-size: 14px;
    color: #555;
    font-weight: normal;
}

.otc-form-hint {
    color: #666;
    margin-bottom: 20px;
    font-size: 13px;
}

/* ── Alerts ────────────────────────────────────────────────────────── */
.otc-form-success,
.otc-form-success-inline {
    background: #e8f5e9;
    border-right: 4px solid #43a047;
    padding: 12px 16px;
    border-radius: 4px;
    color: #2e7d32;
    margin-bottom: 16px;
}

.otc-form-error {
    background: #ffebee;
    border-right: 4px solid #e53935;
    padding: 12px 16px;
    border-radius: 4px;
    color: #c62828;
    margin-bottom: 16px;
}

.otc-form-info {
    background: #e3f2fd;
    border-right: 4px solid #1e88e5;
    padding: 12px 16px;
    border-radius: 4px;
    color: #1565c0;
    margin-bottom: 16px;
}

/* ── Form layout ───────────────────────────────────────────────────── */
.otc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.otc-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.otc-form-group--full {
    grid-column: 1 / -1;
}

.otc-form-group label {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.otc-required {
    color: #e53935;
}

/* ── Inputs ────────────────────────────────────────────────────────── */
.otc-input,
.otc-select,
.otc-textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #2c3e50;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
}

.otc-input:focus,
.otc-select:focus,
.otc-textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,.15);
    background: #fff;
}

.otc-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ── Submit ────────────────────────────────────────────────────────── */
.otc-form-submit {
    margin-top: 20px;
    text-align: left;
}

.otc-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .2s, transform .1s;
}

.otc-btn:active {
    transform: scale(.97);
}

.otc-btn-primary {
    background: #2980b9;
    color: #fff;
}

.otc-btn-primary:hover {
    background: #1f6fa0;
}

/* ── Star rating (Step 2) ──────────────────────────────────────────── */
.otc-star-group {
    margin-bottom: 18px;
}

.otc-star-rating {
    display: flex;
    flex-direction: row-reverse;
    gap: 2px;
    direction: ltr;
    width: fit-content;
}

.otc-star-rating input[type="radio"] {
    display: none;
}

.otc-star-rating label {
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
    transition: color .15s;
    line-height: 1;
}

/* Highlight stars on hover / checked */
.otc-star-rating input:checked ~ label,
.otc-star-rating label:hover,
.otc-star-rating label:hover ~ label {
    color: #f39c12;
}

/* ── Admin star display ────────────────────────────────────────────── */
.otc-stars {
    display: inline-flex;
    gap: 1px;
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

.otc-star-full  { color: #f39c12; }
.otc-star-half  { color: #f39c12; opacity: .65; }
.otc-star-empty { color: #ccc; }

/* ── Suggestion status badges ──────────────────────────────────────── */
.otc-sugg-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.otc-sugg-status--new       { background: #e3f2fd; color: #1565c0; }
.otc-sugg-status--reviewing { background: #fff8e1; color: #f57f17; }
.otc-sugg-status--approved  { background: #e8f5e9; color: #2e7d32; }
.otc-sugg-status--rejected  { background: #ffebee; color: #c62828; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .otc-form-wrap {
        padding: 18px 14px;
    }

    .otc-form-grid {
        grid-template-columns: 1fr;
    }

    .otc-star-rating label {
        font-size: 24px;
    }
}
