/* ============================================================
   Test Desk (TD) — My Tests Page CSS
   File Path : assets/css/my-tests.css
   ============================================================ */

/* ---------- Warning Banner (blinking) ---------- */
.mytests-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff3cd;
    border: 1px solid #ffe08a;
    color: #7a5b00;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 14px 14px 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    animation: mytestsBlink 0.9s ease-in-out infinite;
}

.mytests-warning-ico {
    font-size: 18px;
    flex-shrink: 0;
}

.mytests-warning-text {
    flex: 1;
}

@keyframes mytestsBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

/* ---------- Loading ---------- */
.mytests-loading {
    text-align: center;
    padding: 60px 20px;
}

.mytests-loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px;
    border: 4px solid #d6e7f5;
    border-top-color: #4aa3e0;
    border-radius: 50%;
    animation: mytestsSpin 0.9s linear infinite;
}

@keyframes mytestsSpin {
    to { transform: rotate(360deg); }
}

.mytests-loading-text {
    color: #4a6b85;
    font-size: 15px;
}

/* ---------- Error ---------- */
.mytests-error {
    text-align: center;
    padding: 50px 20px;
}

.mytests-error-text {
    color: #c0392b;
    font-size: 15px;
    margin-top: 6px;
}

/* ---------- Wrap ---------- */
.mytests-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 14px 40px;
}

/* ---------- Header ---------- */
.mytests-head {
    padding: 22px 4px 12px;
}

.mytests-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a3d5c;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.mytests-sub {
    font-size: 14px;
    color: #5a7a95;
    margin: 0;
}

/* ---------- Stats ---------- */
.mytests-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0 22px;
}

.mytests-stat {
    background: #fff;
    border: 1px solid #e2edf6;
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(74, 163, 224, 0.06);
}

.mytests-stat-num {
    font-size: 22px;
    font-weight: 700;
    color: #2c7bc0;
    line-height: 1.1;
}

.mytests-stat-lbl {
    font-size: 12px;
    color: #6a8ba5;
    margin-top: 4px;
}

/* ---------- Attempts List ---------- */
.mytests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mytests-item {
    background: #fff;
    border: 1px solid #e2edf6;
    border-left: 4px solid #4aa3e0;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(74, 163, 224, 0.06);
    transition: box-shadow 0.2s ease;
}

.mytests-item:active {
    box-shadow: 0 3px 8px rgba(74, 163, 224, 0.15);
}

.mytests-item.score-high {
    border-left-color: #22a06b;
}

.mytests-item.score-mid {
    border-left-color: #e0a92b;
}

.mytests-item.score-low {
    border-left-color: #d94a4a;
}

/* Item top row */
.mytests-item-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.mytests-item-ico {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 2px;
}

.mytests-item-info {
    flex: 1;
    min-width: 0;
}

.mytests-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a3d5c;
    margin-bottom: 2px;
    line-height: 1.3;
}

.mytests-item-exam {
    font-size: 12.5px;
    color: #5a7a95;
    margin-bottom: 2px;
}

.mytests-item-date {
    font-size: 11.5px;
    color: #8aa3b8;
}

.mytests-item-pct {
    font-size: 20px;
    font-weight: 700;
    color: #2c7bc0;
    flex-shrink: 0;
    padding-top: 2px;
}

.score-high .mytests-item-pct { color: #22a06b; }
.score-mid  .mytests-item-pct { color: #d99a1f; }
.score-low  .mytests-item-pct { color: #d94a4a; }

/* Meta row */
.mytests-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    padding: 8px 0 10px;
    border-top: 1px solid #eef5fb;
    margin-bottom: 4px;
}

.mytests-meta-ok   { color: #22a06b; font-weight: 600; }
.mytests-meta-bad  { color: #d94a4a; font-weight: 600; }
.mytests-meta-skip { color: #8aa3b8; font-weight: 600; }
.mytests-meta-score {
    margin-left: auto;
    color: #1a3d5c;
    font-weight: 600;
}

/* Actions */
.mytests-item-actions {
    display: flex;
    gap: 8px;
}

.mytests-btn {
    flex: 1;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    transition: background 0.15s ease;
}

.mytests-btn-res {
    background: #eaf4fc;
    color: #2c7bc0;
    border: 1px solid #cfe3f3;
}

.mytests-btn-res:active {
    background: #d9ebf9;
}

.mytests-btn-rev {
    background: #2c7bc0;
    color: #fff;
    border: 1px solid #2c7bc0;
}

.mytests-btn-rev:active {
    background: #1e6aa8;
}

/* ---------- Empty ---------- */
.mytests-empty {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border: 1px dashed #cfe3f3;
    border-radius: 12px;
    margin-top: 10px;
}

.mytests-empty-ico {
    font-size: 42px;
    margin-bottom: 8px;
}

.mytests-empty-text {
    font-size: 15px;
    color: #5a7a95;
}

/* ---------- Guest CTA ---------- */
.mytests-guest-cta {
    background: linear-gradient(135deg, #eaf4fc, #f5faff);
    border: 1px solid #cfe3f3;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 20px;
}

.mytests-guest-text {
    font-size: 14px;
    color: #1a3d5c;
    line-height: 1.4;
}

/* ---------- td-btn fallback (अगर style.css में हो तो ignore) ---------- */
.mytests-empty .td-btn,
.mytests-guest-cta .td-btn {
    display: inline-block;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    margin-top: 12px;
}

.mytests-empty .td-btn-primary,
.mytests-guest-cta .td-btn-primary {
    background: #2c7bc0;
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 380px) {
    .mytests-title    { font-size: 23px; }
    .mytests-stat-num { font-size: 19px; }
    .mytests-item-pct { font-size: 18px; }
    .mytests-item-ico { font-size: 22px; }
}
