/* assets/css/frontend.css */
.spg-paper-generator {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.spg-access-status {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 5px;
}

.spg-alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.spg-alert-info {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    color: #004085;
}

.spg-alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.spg-alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.spg-form-group {
    margin-bottom: 20px;
}

.spg-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.spg-form-row .spg-form-group {
    flex: 1;
}

.spg-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.spg-form-group select,
.spg-form-group input[type="number"],
.spg-form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.spg-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.spg-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.spg-btn-primary {
    background: #007cba;
    color: white;
}

.spg-btn-primary:hover {
    background: #006ba1;
}

.spg-btn-secondary {
    background: #6c757d;
    color: white;
}

.spg-btn-upgrade {
    background: #28a745;
    color: white;
    margin-top: 10px;
}

.spg-btn-download {
    background: #17a2b8;
    color: white;
    margin: 0 5px;
}

.spg-loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

.spg-result {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.spg-paper-content {
    margin: 20px 0;
    padding: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-height: 500px;
    overflow-y: auto;
}

.spg-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.spg-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.spg-badge-trial {
    background: #ffd700;
    color: #000;
}

.spg-badge-premium {
    background: #28a745;
    color: white;
}

.spg-badge-admin {
    background: #dc3545;
    color: white;
}

.spg-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.spg-table th,
.spg-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.spg-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.spg-table tr:hover {
    background: #f5f5f5;
}

/* Responsive */
@media (max-width: 768px) {
    .spg-form-row {
        flex-direction: column;
    }

    .spg-actions {
        flex-direction: column;
    }

    .spg-actions .spg-btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Multi-step form */
.spg-form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.spg-form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.spg-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

/* Chapter selection */
.spg-chapter-selection {
    margin: 20px 0;
}

.spg-unit-section,
.spg-chapter-section {
    margin-bottom: 30px;
}

.spg-unit-container,
.spg-chapter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.spg-unit-item,
.spg-chapter-item {
    flex: 0 0 calc(33.333% - 10px);
    min-width: 200px;
}

@media (max-width: 768px) {

    .spg-unit-item,
    .spg-chapter-item {
        flex: 0 0 100%;
    }
}

.spg-unit-checkbox,
.spg-chapter-checkbox {
    display: none;
}

.spg-unit-label,
.spg-chapter-label {
    display: block;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spg-unit-label:hover,
.spg-chapter-label:hover {
    border-color: #007cba;
    background: #e7f3ff;
}

.spg-unit-checkbox:checked+.spg-unit-label,
.spg-chapter-checkbox:checked+.spg-chapter-label {
    border-color: #007cba;
    background: #007cba;
    color: white;
}

.spg-unit-name,
.spg-chapter-name {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.spg-unit-desc,
.spg-chapter-desc {
    font-size: 12px;
    color: inherit;
    opacity: 0.9;
}

.spg-chapter-actions {
    margin-bottom: 15px;
}

/* Question selection mode */
.spg-question-selection-mode {
    margin: 20px 0;
}

.spg-mode-option {
    margin-bottom: 15px;
}

.spg-mode-option input[type="radio"] {
    display: none;
}

.spg-mode-option label {
    display: block;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spg-mode-option label:hover {
    border-color: #007cba;
    background: #e7f3ff;
}

.spg-mode-option input[type="radio"]:checked+label {
    border-color: #007cba;
    background: #e7f3ff;
}

.spg-mode-option strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.spg-mode-option span {
    font-size: 14px;
    color: #666;
    display: block;
}

/* Range sliders */
.spg-input-with-slider {
    display: flex;
    align-items: center;
    gap: 15px;
}

.spg-input-with-slider input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.spg-input-with-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
}

.spg-input-with-slider input[type="number"] {
    width: 70px;
    text-align: center;
}

/* Question tabs */
.spg-question-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin: 20px 0;
}

.spg-tab-button {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.spg-tab-button:hover {
    color: #007cba;
}

.spg-tab-button.active {
    color: #007cba;
    border-bottom-color: #007cba;
}

.spg-count-badge {
    display: inline-block;
    background: #007cba;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.spg-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.spg-tab-content.active {
    display: block;
}

/* Question filters */
.spg-question-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.spg-question-filters select,
.spg-question-filters input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.spg-question-filters input[type="text"] {
    flex: 1;
    min-width: 200px;
}

/* Questions list */
.spg-questions-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 10px;
}

.spg-question-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
    background: white;
    transition: all 0.3s ease;
}

.spg-question-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.spg-question-item.selected {
    border-color: #007cba;
    background: #e7f3ff;
}

.spg-question-checkbox {
    float: right;
    transform: scale(1.2);
}

.spg-question-text {
    margin-right: 30px;
    line-height: 1.5;
}

.spg-question-meta {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.spg-question-chapter,
.spg-question-difficulty {
    padding: 2px 8px;
    border-radius: 3px;
    background: #f0f0f0;
}

.spg-question-difficulty.easy {
    background: #d4edda;
    color: #155724;
}

.spg-question-difficulty.medium {
    background: #fff3cd;
    color: #856404;
}

.spg-question-difficulty.hard {
    background: #f8d7da;
    color: #721c24;
}

/* Loading spinner */
.spg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spg-loading {
    text-align: center;
    padding: 40px;
    font-style: italic;
    color: #666;
}

.spg-info {
    padding: 15px;
    background: #e7f3ff;
    border-radius: 5px;
    color: #004085;
    margin: 20px 0;
}

.spg-step-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}


/* Dashboard Styles */
.spg-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.spg-dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

.spg-dashboard-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Dashboard Actions */
.spg-dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.spg-dashboard-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 25px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.spg-dashboard-card:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.spg-card-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white !important;
    border-color: #3498db;
}

.spg-card-primary:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: white !important;
}

.spg-card-upgrade {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white !important;
    border-color: #f39c12;
}

.spg-card-upgrade:hover {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white !important;
}

.spg-card-icon {
    font-size: 3em;
}

.spg-card-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.3em;
}

.spg-card-content p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9em;
}

/* Access Info Card */
.spg-access-info-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.spg-access-header {
    margin-bottom: 5px;
}

.spg-access-header h4 {
    margin: 0;
    color: #2c3e50;
}

.spg-access-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
   
}

.spg-stat {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.spg-stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.spg-stat-value {
    font-weight: bold;
    font-size: 1.2em;
    color: #2c3e50;
}

.spg-badge-trial {
    display: inline-block;
    padding: 4px 12px;
    background: #f39c12;
    color: white;
    border-radius: 20px;
    font-size: 0.8em;
}

.spg-badge-premium {
    display: inline-block;
    padding: 4px 12px;
    background: #27ae60;
    color: white;
    border-radius: 20px;
    font-size: 0.8em;
}

/* Dashboard Sections */
.spg-dashboard-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.spg-dashboard-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

/* Upgrade Prompt */
.spg-upgrade-prompt {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.spg-upgrade-prompt p {
    margin: 0 0 15px 0;
    color: #856404;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .spg-dashboard-actions {
        grid-template-columns: 1fr;
    }

    .spg-access-stats {
        grid-template-columns: 1fr;
    }

    .spg-dashboard-section {
        padding: 20px;
    }
}