/**
 * QMCA Point System - Public/Frontend CSS
 * Styling for shortcodes and frontend features
 */

/* ==== Container ==== */
.qmca-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==== Points Display ==== */
.qmca-my-points {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    text-align: center;
}

.qmca-points-value {
    font-size: 48px;
    font-weight: 700;
    margin: 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.qmca-points-label {
    font-size: 16px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qmca-points-baht {
    margin-top: 15px;
    font-size: 18px;
    opacity: 0.95;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* ==== Quiz Filter ==== */
.qmca-quiz-filter {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.qmca-filter-step {
    margin-bottom: 25px;
}

.qmca-filter-step label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 15px;
}

.qmca-filter-step select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.qmca-filter-step select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.qmca-filter-step select:disabled {
    background: #f7fafc;
    cursor: not-allowed;
    opacity: 0.6;
}

.qmca-no-quiz-found {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-top: 20px;
}

.qmca-quiz-found {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-top: 20px;
}

.qmca-quiz-found a {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 10px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.qmca-quiz-found a:hover {
    background: #218838;
}

/* ==== Request Form ==== */
.qmca-request-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
}

.qmca-request-form h4 {
    margin-top: 0;
    color: #333;
}

.qmca-form-row {
    margin-bottom: 20px;
}

.qmca-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
}

.qmca-form-row input[type="text"],
.qmca-form-row input[type="email"],
.qmca-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.qmca-form-row input:focus,
.qmca-form-row textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.qmca-form-row textarea {
    min-height: 100px;
    resize: vertical;
}

.qmca-submit-btn {
    background: #667eea;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.qmca-submit-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.qmca-submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* ==== Dashboard ==== */
.qmca-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.qmca-dashboard-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.qmca-dashboard-card h3 {
    margin-top: 0;
    color: #667eea;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.qmca-dashboard-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.qmca-dashboard-item:last-child {
    border-bottom: none;
}

.qmca-dashboard-label {
    color: #64748b;
}

.qmca-dashboard-value {
    font-weight: 600;
    color: #1e293b;
}

/* ==== Referral Section ==== */
.qmca-referral-link {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

.qmca-referral-code {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.qmca-referral-code input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Monaco', monospace;
}

.qmca-copy-btn {
    background: #10b981;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.qmca-copy-btn:hover {
    background: #059669;
}

.qmca-copy-btn.copied {
    background: #3b82f6;
}

.qmca-referral-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.qmca-stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.qmca-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
}

.qmca-stat-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 5px;
}

/* ==== Withdrawal Form ==== */
.qmca-withdrawal-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

.qmca-withdrawal-info {
    background: #e0f2fe;
    border-left: 4px solid #0ea5e9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.qmca-withdrawal-history {
    margin-top: 30px;
}

.qmca-withdrawal-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qmca-withdrawal-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.qmca-withdrawal-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.qmca-withdrawal-table tr:hover {
    background: #f8f9fa;
}

/* ==== Status Badges ==== */
.qmca-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.qmca-status.pending {
    background: #fff3cd;
    color: #856404;
}

.qmca-status.approved {
    background: #d1ecf1;
    color: #0c5460;
}

.qmca-status.completed {
    background: #d4edda;
    color: #155724;
}

.qmca-status.rejected {
    background: #f8d7da;
    color: #721c24;
}

/* ==== Alerts ==== */
.qmca-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid;
}

.qmca-alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.qmca-alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.qmca-alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

.qmca-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

/* ==== Loading ==== */
.qmca-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: qmca-spin 0.8s linear infinite;
}

@keyframes qmca-spin {
    to { transform: rotate(360deg); }
}

/* ==== Responsive ==== */
@media (max-width: 768px) {
    .qmca-my-points {
        padding: 20px;
    }

    .qmca-points-value {
        font-size: 36px;
    }

    .qmca-quiz-filter {
        padding: 20px;
    }

    .qmca-dashboard {
        grid-template-columns: 1fr;
    }

    .qmca-referral-code {
        flex-direction: column;
    }

    .qmca-copy-btn {
        width: 100%;
    }

    .qmca-withdrawal-table {
        font-size: 14px;
    }

    .qmca-withdrawal-table th,
    .qmca-withdrawal-table td {
        padding: 10px;
    }
}
