/**
 * Mon Compte Page Styles
 * 
 * Design system matching the site's hand-drawn aesthetic
 * with stabilo effects and sketch-style elements
 * 
 * @package DECQuizTheme
 * @version 1.0.0
 */

/* ============================================
   MAIN CONTAINER
   ============================================ */

.decquiz-account {
    min-height: 100vh;
    background: linear-gradient(90deg,
            transparent 0%,
            transparent calc(100% - 1px),
            rgba(0, 0, 0, 0.05) calc(100% - 1px)),
        linear-gradient(0deg,
            transparent 0%,
            transparent calc(100% - 1px),
            rgba(0, 0, 0, 0.05) calc(100% - 1px));
    background-size: 40px 40px;
    padding: 60px 20px;
}

.decquiz-account-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* ============================================
   USER PROFILE SECTION
   ============================================ */

.decquiz-account-profile {
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
    position: relative;
}

.decquiz-profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.decquiz-profile-avatar {
    flex-shrink: 0;
}

.decquiz-profile-avatar img {
    border-radius: 50%;
    border: 3px solid #000000;
    width: 80px;
    height: 80px;
}

.decquiz-profile-info {
    flex: 1;
}

.decquiz-profile-name {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #000000;
    position: relative;
    display: inline-block;
}

.decquiz-profile-name::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 12px;
    background: #fbbf24;
    opacity: 0.4;
    z-index: -1;
    transform: skewY(-1deg);
}

.decquiz-profile-email {
    font-size: 16px;
    color: #666666;
    margin: 0 0 4px 0;
}

.decquiz-profile-member-since {
    font-size: 14px;
    color: #999999;
    margin: 0;
}

.decquiz-profile-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ============================================
   PREMIUM STATUS SECTION
   ============================================ */

.decquiz-account-premium {
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
}

.decquiz-premium-header {
    margin-bottom: 25px;
}

.decquiz-section-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.decquiz-section-title svg {
    flex-shrink: 0;
}

.decquiz-premium-content {
    padding: 25px;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 2px 2px 255px 5px / 255px 5px 2px 2px;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.decquiz-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border: 2px solid #000;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    font-size: 14px;
    font-weight: 800;
    transform: rotate(-1deg);
    text-transform: uppercase;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.decquiz-status-badge.decquiz-status-premium {
    background: linear-gradient(100deg, #86efac 0%, #4ade80 100%);
    color: #000;
}

.decquiz-status-badge.decquiz-status-free {
    background: #f3f4f6;
    color: #000;
}

.decquiz-alert-box {
    padding: 20px;
    border: 3px solid #000;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    margin-bottom: 25px;
    position: relative;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.decquiz-alert-box:hover {
    transform: scale(1.01) rotate(0.5deg);
}

.decquiz-alert-warning {
    background: linear-gradient(100deg, #fef08a 0%, #fde047 100%);
    color: #000;
}

.decquiz-alert-success {
    background: linear-gradient(100deg, #bbf7d0 0%, #86efac 100%);
    color: #000;
}

.decquiz-premium-infinite {
    margin: 0;
    font-weight: 800;
    font-size: 16px;
}

.decquiz-premium-plan,
.decquiz-premium-plan-name,
.decquiz-premium-expiry,
.decquiz-premium-remaining,
.decquiz-premium-description {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.6;
}

.decquiz-premium-remaining {
    font-size: 18px;
    color: #000;
    margin-bottom: 5px;
}

.decquiz-premium-expiry {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
}

.decquiz-premium-inactive .decquiz-premium-description {
    color: #666666;
    margin-bottom: 20px;
}

/* ============================================
   QUIZ RESULTS SECTION
   ============================================ */

/* ============================================
   QUIZ RESULTS SECTION
   ============================================ */

.decquiz-account-results {
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 2px 2px 255px 5px / 255px 5px 2px 2px;
    padding: 40px;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
}

.decquiz-results-header {
    margin-bottom: 25px;
}

.decquiz-results-table-wrapper {
    overflow-x: auto;
}

.decquiz-results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 3px solid #000000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

.decquiz-results-table thead {
    background: #000000;
}

.decquiz-results-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    border-bottom: 3px solid #000000;
}

.decquiz-results-table td {
    padding: 15px 20px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.decquiz-results-table tbody tr:last-child td {
    border-bottom: none;
}

.decquiz-results-table tbody tr:hover {
    background: #fffbeb;
    /* Light yellow hover */
}

.decquiz-quiz-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid currentColor;
}

.decquiz-quiz-type-free {
    background: #dbeafe;
    color: #1e40af;
    border-color: #1e40af;
}

.decquiz-quiz-type-classic {
    background: #fef3c7;
    color: #92400e;
    border-color: #92400e;
}

.decquiz-quiz-type-custom {
    background: #fce7f3;
    color: #9f1239;
    border-color: #9f1239;
}

.decquiz-score {
    font-weight: 900;
    color: #000;
    background: #fde047;
    /* Stabilo yellow */
    padding: 2px 8px;
    border-radius: 4px;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.decquiz-results-table th:last-child {
    text-align: right;
}

.decquiz-btn-view-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.decquiz-btn-view-details::before {
    content: '';
    width: 18px;
    height: 18px;
    /* Sketchy Eye Icon SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.decquiz-btn-view-details:hover {
    background: #fde047;
    /* Stabilo yellow */
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 1);
    color: #000;
}

.decquiz-results-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666666;
}

.decquiz-results-empty p {
    font-size: 18px;
    margin: 0 0 25px 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.decquiz-btn {
    display: inline-block;
    padding: 12px 30px;
    border: 3px solid #000000;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.decquiz-btn-primary {
    background: #667eea;
    color: #ffffff;
}

.decquiz-btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.decquiz-btn-secondary {
    background: #ffffff;
    color: #000000;
}

.decquiz-btn-secondary:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.decquiz-btn-text {
    position: relative;
    z-index: 1;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .decquiz-account {
        padding: 10px 10px;
        /* Maximize width */
    }

    .decquiz-account-profile,
    .decquiz-account-premium,
    .decquiz-account-results {
        padding: 15px;
        /* Reduce internal padding */
    }

    /* Stack Profile Layout - COMPACT */
    .decquiz-profile-header {
        flex-direction: row;
        /* Keep row but smaller */
        align-items: center;
        text-align: left;
        gap: 15px;
        margin-bottom: 15px;
    }

    .decquiz-profile-avatar img {
        width: 60px;
        /* Smaller avatar */
        height: 60px;
    }

    .decquiz-profile-name {
        font-size: 20px;
        /* Smaller name */
        margin-bottom: 2px;
    }

    .decquiz-profile-email {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .decquiz-profile-member-since {
        font-size: 12px;
    }

    .decquiz-profile-name::after {
        left: 0;
        transform: skewY(-1deg);
        width: 100%;
    }

    .decquiz-profile-actions {
        justify-content: center;
        width: 100%;
        margin-top: 10px;
    }

    .decquiz-profile-actions .decquiz-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        /* Smaller button */
    }

    /* CARD-STYLE TABLE FOR MOBILE */
    .decquiz-results-table thead {
        display: none;
        /* Hide header on mobile */
    }

    .decquiz-results-table,
    .decquiz-results-table tbody,
    .decquiz-results-table tr,
    .decquiz-results-table td {
        display: block;
        width: 100%;
        border: none;
    }

    .decquiz-results-table {
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .decquiz-results-table tbody tr {
        background: #ffffff;
        border: 3px solid #000000;
        border-radius: 12px;
        margin-bottom: 15px;
        /* Less margin */
        padding: 15px;
        box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
        position: relative;
    }

    .decquiz-results-table td {
        padding: 6px 0;
        /* Tighter rows */
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed #eee;
    }

    .decquiz-results-table td:last-child {
        border-bottom: none;
        padding-top: 12px;
        justify-content: center;
    }

    /* Add labels via data attributes or explicit formatting */
    .decquiz-results-table td::before {
        content: attr(data-label);
        font-weight: 800;
        text-transform: uppercase;
        font-size: 11px;
        color: #999;
    }

    /* PREMIUM SECTION MOBILE OPTIMIZATIONS */
    .decquiz-account-premium {
        text-align: center;
    }

    .decquiz-section-title {
        justify-content: center;
        font-size: 18px;
        /* Slightly smaller title */
    }

    .decquiz-premium-header {
        text-align: center;
        margin-bottom: 15px;
    }

    /* FIX: Allow inline layout if space permits */
    .decquiz-premium-plan {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 6px;
        margin-bottom: 10px;
    }

    .decquiz-premium-plan strong {
        display: inline;
        /* Keep inline */
        width: auto;
        margin-bottom: 0;
    }

    .decquiz-status-badge {
        transform: none !important;
        display: inline-block;
        font-size: 11px;
        padding: 4px 10px;
        margin-top: 0;
    }

    .decquiz-alert-box {
        transform: none !important;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        border-radius: 8px;
        /* Simple rounded box on mobile */
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 15px;
    }

    .decquiz-alert-box p {
        justify-content: center;
        margin-bottom: 5px;
    }

    .decquiz-alert-box:hover {
        transform: none !important;
    }
}

/* AVATAR BUILDER STYLES */
/* ============================================ */

/* Avatar Container on Profile */
.mqa-avatar-container {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.2s;
    border: 3px solid black;
}

.mqa-avatar-container:hover {
    transform: scale(1.05);
}

.mqa-edit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 16px;
    text-align: center;
    padding: 5px 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.mqa-avatar-container:hover .mqa-edit-overlay {
    opacity: 1;
}

/* Modal */
.mqa-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mqa-modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;

    /* Sketch Box Style */
    border: 3px solid #000000;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.2);
}

.mqa-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    color: #000;
}

.mqa-modal-title {
    margin-top: 0;
    font-size: 24px;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 30px;
}

/* Builder Layout */
.mqa-avatar-builder {
    display: flex;
    gap: 30px;
}

.mqa-ab-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: 2px dashed #ccc;
    border-radius: 12px;
    min-height: 300px;
}

.mqa-ab-controls {
    flex: 1.5;
}

/* Tabs */
.mqa-ab-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.mqa-ab-tab {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    padding: 5px 10px;
    opacity: 0.5;
    position: relative;
}

.mqa-ab-tab.active {
    opacity: 1;
    color: #000;
}

.mqa-ab-tab.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 3px;
    background: #000;
}

/* Panels */
.mqa-ab-panel {
    display: none;
}

.mqa-ab-panel.active {
    display: block;
    animation: fadeIn 0.3s;
}

.mqa-ab-options,
.mqa-ab-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.mqa-ab-btn {
    padding: 8px 16px;
    border: 2px solid #ccc;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.mqa-ab-btn:hover {
    border-color: #000;
}

.mqa-ab-btn.active {
    border-color: #000;
    background: #fde047;
    /* Yellow highlight */
    box-shadow: 2px 2px 0 #000;
}

.mqa-ab-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.mqa-ab-color:hover {
    transform: scale(1.1);
}

.mqa-ab-actions {
    text-align: right;
    margin-top: 20px;
    border-top: 2px solid #eee;
    padding-top: 20px;
}

@media (max-width: 768px) {
    .mqa-avatar-builder {
        flex-direction: column;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}