/**
 * YSP Practice Modal Styles
 * Styles for practice buttons and SweetAlert modals
 */

/* =====================================================
   INTEGRATED PRACTICE BAR (framed YSP style)
   ===================================================== */

.ysp-practice-nav.ysp-integrated-practice {
    margin: 26px 0;
    padding: 18px 18px 16px;
    background: #fff;
    border: 5px solid #0A6A73; /* your YSP teal */
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

/* The small “module tag” title */
.ysp-integrated-practice-label {
    display: inline-block;
    margin: 0 0 12px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #0A6A73;
    background: rgba(10, 106, 115, 0.08);
    border-radius: 999px;
}

/* If you keep the scenario title line, make it calm/clean */
.ysp-practice-bar-title {
    margin-bottom: 12px;
}

.ysp-practice-bar-title-left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    color: #0A6A73;
    font-weight: 700;
}

.ysp-practice-bar-label {
    opacity: 0.9;
    font-weight: 700;
}

.ysp-practice-bar-sep {
    opacity: 0.6;
}

.ysp-practice-bar-scenario {
    color: #12343a; /* darker neutral */
    font-weight: 700;
}

/* Layout only: keep WP buttons, but align nicely */
.ysp-practice-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Don’t “style” buttons; only fix sizing/spacing */
.ysp-practice-btn.button {
    min-width: 200px;
    padding: 10px 18px;
    border-radius: 8px;
}

/* Title row */
.ysp-practice-bar-title {
  margin-bottom: 12px;
}

.ysp-practice-bar-title-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.ysp-practice-bar-label {
  font-weight: 800;
  color: #0A6A73;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 13px;
}

.ysp-practice-bar-sep {
  opacity: 0.55;
  font-weight: 700;
}

.ysp-practice-bar-scenario {
  font-weight: 800;
  color: #12343a;
  font-size: 16px; /* makes the scenario title pop */
}

/* Mobile: full width buttons */
@media (max-width: 560px) {
    .ysp-practice-btn.button {
        min-width: 100%;
        width: 100%;
    }
}

/* =====================================================
   SWAL MODAL CUSTOMIZATION
   ===================================================== */

.ysp-practice-modal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ysp-practice-modal .swal2-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
}

.ysp-practice-content {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    text-align: left;
}

/* Smooth scrollbar */
.ysp-practice-content::-webkit-scrollbar {
    width: 8px;
}

.ysp-practice-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ysp-practice-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ysp-practice-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.ysp-practice-close {
    font-size: 28px !important;
    color: #718096 !important;
}

.ysp-practice-close:hover {
    color: #2d3748 !important;
}

/* =====================================================
   LOADING SPINNER
   ===================================================== */

.ysp-loading-spinner {
    width: 50px;
    height: 50px;
    margin: 20px auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: ysp-spin 1s linear infinite;
}

@keyframes ysp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =====================================================
   PRACTICE CONTENT STYLES
   Make sure practice content looks good in modal
   ===================================================== */

.ysp-practice-content .gap-fill-item,
.ysp-practice-content .grammar-gap-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ysp-practice-content .gap-fill-item.answered,
.ysp-practice-content .grammar-gap-item.answered {
    border-color: #cbd5e0;
}

.ysp-practice-content .gap-fill-item.correct {
    border-color: #48bb78;
    background: #f0fff4;
}

.ysp-practice-content .gap-fill-item.incorrect {
    border-color: #f56565;
    background: #fff5f5;
}

.ysp-practice-content .option-btn,
.ysp-practice-content .grammar-option {
    margin: 8px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #2d3748;
    background: #edf2f7;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ysp-practice-content .option-btn:hover,
.ysp-practice-content .grammar-option:hover {
    background: #e2e8f0;
    border-color: #a0aec0;
    transform: translateY(-1px);
}

.ysp-practice-content .option-btn.correct,
.ysp-practice-content .grammar-option.correct {
    background: #48bb78;
    color: #fff;
    border-color: #48bb78;
}

.ysp-practice-content .option-btn.incorrect,
.ysp-practice-content .grammar-option.incorrect {
    background: #f56565;
    color: #fff;
    border-color: #f56565;
}

.ysp-practice-content .option-btn.show-correct,
.ysp-practice-content .grammar-option.show-correct {
    background: #48bb78;
    color: #fff;
    border-color: #48bb78;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.ysp-practice-content .practice-results {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.ysp-practice-content .practice-results.excellent {
    background: #f0fff4;
    border: 2px solid #48bb78;
    color: #22543d;
}

.ysp-practice-content .practice-results.good {
    background: #fefcbf;
    border: 2px solid #ecc94b;
    color: #744210;
}

.ysp-practice-content .practice-results.needs-practice {
    background: #fff5f5;
    border: 2px solid #fc8181;
    color: #742a2a;
}

/* =====================================================
   RESPONSIVE STYLES
   ===================================================== */

@media (max-width: 768px) {
    .ysp-practice-buttons {
        flex-direction: column;
    }
    
    .ysp-practice-btn {
        width: 100%;
        min-width: auto;
    }
    
    .ysp-practice-modal {
        width: 95% !important;
    }
    
    .ysp-practice-content {
        padding: 15px;
    }
}








