/**
 * WebArthem WP MembersClub - Public Styles
 * Modern, Clean, Mobile-First Design
 *
 * @package WebArthem_MembersClub
 * @author José Márcio Barthem <jose.barthem@webarthem.com.br>
 * @since 1.0.0
 */

/* ==========================================
   CSS VARIABLES
   ========================================== */

:root {
    --webarthem-mc-primary: #4A90E2;
    --webarthem-mc-secondary: #2ECC71;
    --webarthem-mc-danger: #E74C3C;
    --webarthem-mc-warning: #F39C12;
    --webarthem-mc-info: #3498DB;
    --webarthem-mc-dark: #2c3e50;
    --webarthem-mc-light: #ecf0f1;
    --webarthem-mc-border: #ddd;
    --webarthem-mc-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --webarthem-mc-radius: 12px;
    --webarthem-mc-transition: all 0.3s ease;
}

/* ==========================================
   BASE TYPOGRAPHY
   ========================================== */

.webarthem-mc-account,
.webarthem-mc-status-widget,
.webarthem-mc-levels-grid {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--webarthem-mc-dark);
}

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

.webarthem-mc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--webarthem-mc-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--webarthem-mc-transition);
    cursor: pointer;
    text-align: center;
}

.webarthem-mc-button.primary {
    background: var(--webarthem-mc-primary);
    color: #fff;
}

.webarthem-mc-button.primary:hover {
    background: #357ABD;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.webarthem-mc-button.secondary {
    background: var(--webarthem-mc-secondary);
    color: #fff;
}

.webarthem-mc-button.secondary:hover {
    background: #27AE60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.webarthem-mc-button.danger {
    background: var(--webarthem-mc-danger);
    color: #fff;
}

.webarthem-mc-button.danger:hover {
    background: #C0392B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.webarthem-mc-button.warning {
    background: var(--webarthem-mc-warning);
    color: #fff;
}

.webarthem-mc-button.warning:hover {
    background: #E67E22;
}

.webarthem-mc-button.small {
    padding: 8px 16px;
    font-size: 14px;
}

.webarthem-mc-button.large {
    padding: 16px 32px;
    font-size: 18px;
}

.webarthem-mc-button.full-width {
    width: 100%;
}

.webarthem-mc-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ==========================================
   NOTICE / ALERTS
   ========================================== */

.webarthem-mc-notice {
    padding: 20px;
    border-radius: var(--webarthem-mc-radius);
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.webarthem-mc-notice .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.webarthem-mc-notice.info {
    background: #e3f2fd;
    border-left: 4px solid var(--webarthem-mc-info);
    color: #0277bd;
}

.webarthem-mc-notice.warning {
    background: #fff3e0;
    border-left: 4px solid var(--webarthem-mc-warning);
    color: #e65100;
}

.webarthem-mc-notice.success {
    background: #e8f5e9;
    border-left: 4px solid var(--webarthem-mc-secondary);
    color: #2e7d32;
}

.webarthem-mc-notice h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.webarthem-mc-notice p {
    margin: 0 0 15px 0;
}

/* ==========================================
   ACCOUNT PAGE
   ========================================== */

.webarthem-mc-account {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.webarthem-mc-account-header {
    background: linear-gradient(135deg, var(--webarthem-mc-primary), #357ABD);
    color: #fff;
    padding: 30px;
    border-radius: var(--webarthem-mc-radius);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--webarthem-mc-shadow);
}

.webarthem-mc-account-header .member-avatar {
    flex-shrink: 0;
}

.webarthem-mc-account-header .member-avatar img {
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    display: block;
}

.webarthem-mc-account-header .member-info h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: #fff;
}

.webarthem-mc-account-header .member-email {
    margin: 0 0 10px 0;
    opacity: 0.9;
}

.webarthem-mc-account-header .member-level {
    margin-top: 10px;
}

/* ==========================================
   STATUS CARD
   ========================================== */

.webarthem-mc-status-card {
    background: #fff;
    border-radius: var(--webarthem-mc-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--webarthem-mc-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.webarthem-mc-status-card.active {
    border-left: 4px solid var(--webarthem-mc-secondary);
}

.webarthem-mc-status-card.inactive {
    border-left: 4px solid var(--webarthem-mc-danger);
}

.webarthem-mc-status-card .status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.webarthem-mc-status-card.active .status-icon {
    background: linear-gradient(135deg, var(--webarthem-mc-secondary), #27AE60);
}

.webarthem-mc-status-card.inactive .status-icon {
    background: linear-gradient(135deg, var(--webarthem-mc-danger), #C0392B);
}

.webarthem-mc-status-card .status-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #fff;
}

.webarthem-mc-status-card .status-content h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.webarthem-mc-status-card .status-content p {
    margin: 0 0 10px 0;
}

.webarthem-mc-status-card .days-remaining {
    font-size: 18px;
    font-weight: 600;
}

.webarthem-mc-status-card .days-remaining.warning {
    color: var(--webarthem-mc-warning);
}

/* ==========================================
   DETAILS GRID
   ========================================== */

.webarthem-mc-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.webarthem-mc-card {
    background: #fff;
    border-radius: var(--webarthem-mc-radius);
    padding: 24px;
    box-shadow: var(--webarthem-mc-shadow);
}

.webarthem-mc-card h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: var(--webarthem-mc-dark);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--webarthem-mc-light);
}

.webarthem-mc-card .detail-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--webarthem-mc-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.webarthem-mc-card .detail-row:last-child {
    border-bottom: none;
}

.webarthem-mc-card .detail-row .label {
    font-weight: 600;
    color: #7f8c8d;
}

.webarthem-mc-card .detail-row .value {
    text-align: right;
}

/* ==========================================
   BENEFITS LIST
   ========================================== */

.benefits-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.benefits-list li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.benefits-list .dashicons {
    color: var(--webarthem-mc-secondary);
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ==========================================
   ACTIONS GRID
   ========================================== */

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

/* ==========================================
   HISTORY TABLE
   ========================================== */

.webarthem-mc-history-table {
    width: 100%;
    border-collapse: collapse;
}

.webarthem-mc-history-table td {
    padding: 12px;
    border-bottom: 1px solid var(--webarthem-mc-light);
}

.webarthem-mc-history-table .date {
    font-size: 13px;
    color: #7f8c8d;
    white-space: nowrap;
}

.webarthem-mc-history-table .action code {
    background: var(--webarthem-mc-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.webarthem-mc-history-table .description {
    color: #555;
}

/* ==========================================
   STATUS WIDGET
   ========================================== */

.webarthem-mc-status-widget {
    background: #fff;
    border-radius: var(--webarthem-mc-radius);
    overflow: hidden;
    box-shadow: var(--webarthem-mc-shadow);
}

.webarthem-mc-status-widget.active {
    border-top: 4px solid var(--webarthem-mc-secondary);
}

.webarthem-mc-status-widget.inactive {
    border-top: 4px solid var(--webarthem-mc-danger);
}

.webarthem-mc-status-widget .status-header {
    padding: 15px;
    text-align: center;
    background: linear-gradient(to bottom, #f8f9fa, #fff);
}

.webarthem-mc-status-widget .status-body {
    padding: 20px;
    text-align: center;
}

.webarthem-mc-status-widget .status-body h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.webarthem-mc-status-widget .status-body p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.webarthem-mc-status-widget .status-body .days-count {
    font-weight: 600;
    font-size: 16px;
}

.webarthem-mc-status-widget .status-body .days-count.urgent {
    color: var(--webarthem-mc-danger);
}

.webarthem-mc-status-widget .status-body .days-count.warning {
    color: var(--webarthem-mc-warning);
}

.webarthem-mc-status-widget .status-footer {
    padding: 15px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
}

/* ==========================================
   LEVELS GRID
   ========================================== */

.webarthem-mc-levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.webarthem-mc-level-card {
    background: #fff;
    border-radius: var(--webarthem-mc-radius);
    overflow: hidden;
    box-shadow: var(--webarthem-mc-shadow);
    transition: var(--webarthem-mc-transition);
}

.webarthem-mc-level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.webarthem-mc-level-card .level-header {
    padding: 30px;
    color: #fff;
    text-align: center;
}

.webarthem-mc-level-card .level-header .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.webarthem-mc-level-card .level-header h3 {
    margin: 0;
    font-size: 24px;
    color: #fff;
}

.webarthem-mc-level-card .level-body {
    padding: 30px;
}

.webarthem-mc-level-card .description {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.webarthem-mc-level-card .level-price {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--webarthem-mc-dark);
    margin: 20px 0;
}

.webarthem-mc-level-card .level-price .period {
    font-size: 14px;
    font-weight: 400;
    color: #7f8c8d;
}

.webarthem-mc-level-card .level-features {
    list-style: none;
    margin: 20px 0 0 0;
    padding: 0;
}

.webarthem-mc-level-card .level-features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.webarthem-mc-level-card .level-features .dashicons {
    color: var(--webarthem-mc-secondary);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.webarthem-mc-level-card .level-footer {
    padding: 20px 30px;
    background: #f8f9fa;
}

/* ==========================================
   ACCESS DENIED
   ========================================== */

.webarthem-mc-access-denied {
    text-align: center;
    padding: 60px 30px;
    background: #fff;
    border-radius: var(--webarthem-mc-radius);
    box-shadow: var(--webarthem-mc-shadow);
    margin: 40px 0;
}

.webarthem-mc-access-denied .webarthem-mc-lock-icon {
    margin-bottom: 20px;
}

.webarthem-mc-access-denied .webarthem-mc-lock-icon .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: var(--webarthem-mc-warning);
}

.webarthem-mc-access-denied h3 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: var(--webarthem-mc-dark);
}

.webarthem-mc-access-denied .webarthem-mc-message {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.webarthem-mc-access-denied .webarthem-mc-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ==========================================
   MEMBER NOTICE (for accessible content)
   ========================================== */

.webarthem-mc-member-notice {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-left: 4px solid var(--webarthem-mc-secondary);
    padding: 15px 20px;
    border-radius: var(--webarthem-mc-radius);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2e7d32;
    font-weight: 600;
}

.webarthem-mc-member-notice .dashicons {
    color: var(--webarthem-mc-secondary);
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ==========================================
   RESPONSIVE - MOBILE FIRST
   ========================================== */

@media (max-width: 768px) {
    .webarthem-mc-account {
        padding: 15px;
    }

    .webarthem-mc-account-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .webarthem-mc-account-header .member-info h2 {
        font-size: 24px;
    }

    .webarthem-mc-status-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .webarthem-mc-status-card .status-content h3 {
        font-size: 20px;
    }

    .webarthem-mc-details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .webarthem-mc-card {
        padding: 20px;
    }

    .webarthem-mc-card .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .webarthem-mc-card .detail-row .value {
        text-align: left;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .webarthem-mc-levels-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .webarthem-mc-access-denied {
        padding: 40px 20px;
    }

    .webarthem-mc-access-denied h3 {
        font-size: 22px;
    }

    .webarthem-mc-access-denied .webarthem-mc-actions {
        flex-direction: column;
    }

    .webarthem-mc-history-table .date {
        font-size: 11px;
    }

    .webarthem-mc-history-table .action,
    .webarthem-mc-history-table .description {
        font-size: 13px;
    }

    .webarthem-mc-status-widget .status-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .webarthem-mc-button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .webarthem-mc-level-card .level-price {
        font-size: 28px;
    }

    .webarthem-mc-access-denied .webarthem-mc-lock-icon .dashicons {
        font-size: 60px;
        width: 60px;
        height: 60px;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.webarthem-mc-account,
.webarthem-mc-level-card,
.webarthem-mc-card {
    animation: fadeInUp 0.5s ease-out;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.webarthem-mc-button:focus,
.webarthem-mc-card:focus-within {
    outline: 2px solid var(--webarthem-mc-primary);
    outline-offset: 2px;
}

/* Skip to content */
.webarthem-mc-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--webarthem-mc-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.webarthem-mc-skip-link:focus {
    top: 0;
}
