/* File: ielts-pro/assets/css/frontend.css */

.ieltsp-frontend,
.ieltsp-test-player {
    color: #1f2937;
    font-family: inherit;
    line-height: 1.5;
}

.ieltsp-frontend *,
.ieltsp-frontend *::before,
.ieltsp-frontend *::after,
.ieltsp-test-player *,
.ieltsp-test-player *::before,
.ieltsp-test-player *::after {
    box-sizing: border-box;
}

.ieltsp-container {
    margin: 0 auto;
    max-width: 1180px;
    padding: 24px 16px;
}

.ieltsp-message {
    border-radius: 10px;
    margin: 16px 0;
    padding: 12px 14px;
}

.ieltsp-message-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.ieltsp-message-success {
    background: #ecfdf3;
    color: #027a48;
}

.ieltsp-message-error {
    background: #fef2f2;
    color: #b42318;
}

.ieltsp-dashboard-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.ieltsp-dashboard-header h2 {
    margin: 0;
}

.ieltsp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.ieltsp-tab-button {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #111827;
    cursor: pointer;
    padding: 9px 14px;
}

.ieltsp-tab-button.is-active {
    background: #111827;
    color: #fff;
}

.ieltsp-tab-panel {
    display: none;
}

.ieltsp-tab-panel.is-active {
    display: block;
}

.ieltsp-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ieltsp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    padding: 18px;
}

.ieltsp-card h3 {
    margin: 0 0 8px;
}

.ieltsp-meta {
    color: #6b7280;
    font-size: 14px;
}

.ieltsp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ieltsp-button,
.ieltsp-frontend button.ieltsp-button,
.ieltsp-test-player button.ieltsp-button {
    align-items: center;
    background: #111827;
    border: 1px solid #111827;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    justify-content: center;
    line-height: 1;
    min-height: 40px;
    padding: 11px 16px;
    text-decoration: none;
}

.ieltsp-button:hover,
.ieltsp-button:focus {
    background: #374151;
    color: #fff;
}

.ieltsp-button-secondary {
    background: #fff;
    border-color: #d1d5db;
    color: #111827;
}

.ieltsp-button-secondary:hover,
.ieltsp-button-secondary:focus {
    background: #f9fafb;
    color: #111827;
}

.ieltsp-button-danger {
    background: #b42318;
    border-color: #b42318;
}

.ieltsp-table-wrap {
    overflow-x: auto;
}

.ieltsp-table {
    border-collapse: collapse;
    min-width: 720px;
    width: 100%;
}

.ieltsp-table th,
.ieltsp-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.ieltsp-table th {
    background: #f9fafb;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
}

.ieltsp-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
}

.ieltsp-badge-success,
.ieltsp-badge-completed,
.ieltsp-badge-reviewed {
    background: #dcfae6;
    color: #067647;
}

.ieltsp-badge-warning,
.ieltsp-badge-pending_review,
.ieltsp-badge-submitted,
.ieltsp-badge-in_progress {
    background: #fef0c7;
    color: #93370d;
}

.ieltsp-badge-default {
    background: #f3f4f6;
    color: #374151;
}

.ieltsp-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin: 0 auto;
    max-width: 540px;
    padding: 22px;
}

.ieltsp-form h2 {
    margin-top: 0;
}

.ieltsp-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.ieltsp-form-field label {
    font-weight: 700;
}

.ieltsp-form-field input,
.ieltsp-form-field select,
.ieltsp-form-field textarea {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font: inherit;
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
}

.ieltsp-form-field textarea {
    min-height: 120px;
}

.ieltsp-profile-image {
    border-radius: 999px;
    height: 88px;
    object-fit: cover;
    width: 88px;
}

.ieltsp-test-player {
    background: #f8fafc;
    min-height: 100vh;
}

.ieltsp-player-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.ieltsp-player-sidebar {
    background: #111827;
    color: #fff;
    padding: 20px;
}

.ieltsp-player-sidebar h2,
.ieltsp-player-sidebar h3 {
    color: #fff;
}

.ieltsp-module-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 18px 0;
}

.ieltsp-module-pill {
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    color: #fff;
    padding: 10px;
}

.ieltsp-module-pill.is-active {
    background: #fff;
    color: #111827;
}

.ieltsp-player-main {
    padding: 24px;
}

.ieltsp-player-topbar {
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 14px 18px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.ieltsp-timer {
    background: #111827;
    border-radius: 999px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 10px 14px;
}

.ieltsp-player-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 18px;
    padding: 20px;
}

.ieltsp-section-content {
    margin-bottom: 18px;
}

.ieltsp-question {
    border-top: 1px solid #e5e7eb;
    padding: 18px 0;
}

.ieltsp-question:first-child {
    border-top: 0;
}

.ieltsp-question-title {
    font-weight: 800;
    margin-bottom: 8px;
}

.ieltsp-question-text {
    margin-bottom: 12px;
}

.ieltsp-question-answer input[type="text"],
.ieltsp-question-answer textarea,
.ieltsp-question-answer select {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font: inherit;
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
}

.ieltsp-question-answer textarea {
    min-height: 180px;
}

.ieltsp-option {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    margin: 8px 0;
}

.ieltsp-recorder {
    background: #f9fafb;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 14px;
}

.ieltsp-recorder-status {
    color: #6b7280;
    margin-top: 8px;
}

.ieltsp-recorder-status-error {
    color: #b42318;
}

.ieltsp-recorder-status-success {
    color: #067647;
}

.ieltsp-recorder-status-recording {
    color: #b54708;
    font-weight: 700;
}

.ieltsp-recorder-player {
    display: block;
    margin-top: 12px;
    width: 100%;
}

.ieltsp-player-footer {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.ieltsp-warning-counter {
    color: #b54708;
    font-weight: 700;
}

@media (max-width: 980px) {
    .ieltsp-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ieltsp-player-shell {
        grid-template-columns: 1fr;
    }

    .ieltsp-player-sidebar {
        position: static;
    }

    .ieltsp-module-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .ieltsp-container {
        padding: 18px 12px;
    }

    .ieltsp-dashboard-header,
    .ieltsp-player-topbar,
    .ieltsp-player-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .ieltsp-card-grid {
        grid-template-columns: 1fr;
    }

    .ieltsp-player-main {
        padding: 14px;
    }

    .ieltsp-timer {
        text-align: center;
    }

    .ieltsp-button {
        width: 100%;
    }
}