/**
 * Modeo Account - Dashboard
 * 
 * Premium styles for dashboard page with quick actions and stats
 */

/* ========================================
   DASHBOARD WRAPPER
   ======================================== */

.modeo-account-dashboard {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
}

/* ========================================
   WELCOME SECTION
   ======================================== */

.account-dashboard-welcome {
    padding: 24px;
    background: linear-gradient(135deg, rgba(204, 22, 22, 0.03) 0%, rgba(248, 113, 113, 0.02) 100%);
    border-radius: 12px;
    border: 1px solid rgba(204, 22, 22, 0.08);
}

.dashboard-heading {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.dashboard-subheading {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .modeo-account-dashboard {
        gap: 20px;
    }

    .account-dashboard-welcome {
        padding: 18px;
        border-radius: 10px;
    }

    .dashboard-heading {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    .dashboard-subheading {
        font-size: 0.8125rem;
        line-height: 1.5;
    }
}

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

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 1200px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.quick-action-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    min-width: 0;
}

.quick-action-card:hover {
    border-color: rgba(204, 22, 22, 0.2);
    box-shadow: 0 4px 16px rgba(204, 22, 22, 0.08);
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 28px;
    color: #cc1616;
}

.quick-action-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
    padding-right: 28px;
}

.quick-action-description {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.quick-action-arrow {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 18px;
    color: #6b7280;
    opacity: 0;
    transition: all 0.3s ease;
}

.quick-action-card:hover .quick-action-arrow {
    opacity: 1;
    color: #cc1616;
    transform: translateX(4px);
}

@media (max-width: 767px) {
    .quick-action-card {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) 20px;
        grid-template-rows: auto auto;
        column-gap: 10px;
        row-gap: 2px;
        padding: 14px;
        border-radius: 10px;
    }

    .quick-action-card:hover {
        transform: none;
    }

    .quick-action-icon {
        grid-row: 1 / span 2;
        font-size: 24px;
        align-self: center;
    }

    .quick-action-title {
        padding-right: 0;
        font-size: 0.875rem;
    }

    .quick-action-description {
        font-size: 0.75rem;
    }

    .quick-action-arrow {
        position: static;
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
        justify-self: end;
        opacity: 1;
    }
}

/* ========================================
   RECENT ORDERS
   ======================================== */

.account-recent-orders {
    /* Spacing handled by parent */
}

.recent-orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-order-item {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s ease;
    min-width: 0;
}

.recent-order-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(204, 22, 22, 0.15);
}

.recent-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.recent-order-number {
    min-width: 0;
}

.recent-order-number strong {
    overflow-wrap: anywhere;
}

.recent-order-number .label {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-right: 6px;
}

.recent-order-details {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.recent-order-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 0;
}

.info-icon {
    font-size: 16px;
    color: #cc1616;
}

.recent-order-total {
    margin-left: auto;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: right;
}

@media (max-width: 767px) {
    .modeo-account-dashboard .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 16px;
    }

    .modeo-account-dashboard .section-heading {
        margin-bottom: 14px;
        line-height: 1.25;
    }

    .modeo-account-dashboard .section-header .section-heading {
        margin-bottom: 0;
    }

    .modeo-account-dashboard .view-all-link {
        min-height: 44px;
    }

    .recent-orders-list {
        gap: 12px;
    }

    .recent-order-item {
        padding: 16px;
        border-radius: 14px;
    }

    .recent-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
    }

    .recent-order-details {
        display: grid;
        grid-template-columns: 1fr;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }

    .recent-order-info,
    .recent-order-total {
        font-size: 0.875rem;
    }

    .recent-order-total {
        margin-left: 0;
        text-align: left;
    }
}

/* ========================================
   ACCOUNT STATS
   ======================================== */

.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

@media (max-width: 767px) {
    .account-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(204, 22, 22, 0.04) 0%, rgba(248, 113, 113, 0.02) 100%);
    border-radius: 12px;
    border: 1px solid rgba(204, 22, 22, 0.08);
    transition: all 0.2s ease;
    min-width: 0;
}

.stat-card:hover {
    border-color: rgba(204, 22, 22, 0.2);
    box-shadow: 0 2px 8px rgba(204, 22, 22, 0.08);
}

.stat-icon {
    font-size: 22px;
    color: #cc1616;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.stat-value {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: anywhere;
}

.stat-value-price,
.recent-order-price {
    word-break: break-word;
}

.stat-value-price .woocommerce-Price-amount,
.recent-order-price .woocommerce-Price-amount {
    white-space: normal;
}

.stat-label {
    font-size: 0.6875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .stat-card {
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
        border-radius: 14px;
    }

    .stat-icon {
        font-size: 24px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.6875rem;
    }
}

/* ========================================
   ORDER STATUS BADGES
   ======================================== */

.modeo-order-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Success - Completed orders */
.modeo-order-status-badge.badge-success {
    background: rgba(39, 174, 96, 0.12);
    color: #27ae60;
}

/* Info - Processing orders */
.modeo-order-status-badge.badge-info {
    background: rgba(204, 22, 22, 0.1);
    color: #cc1616;
}

/* Warning - Pending/On-hold */
.modeo-order-status-badge.badge-warning {
    background: rgba(243, 156, 18, 0.12);
    color: #d68910;
}

/* Danger - Failed/Cancelled */
.modeo-order-status-badge.badge-danger {
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

/* Secondary - Refunded */
.modeo-order-status-badge.badge-secondary {
    background: rgba(127, 140, 141, 0.12);
    color: #5d6d7e;
}

/* ========================================
   RECENT ORDER ACTIONS
   ======================================== */

.recent-order-actions {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
}

.recent-order-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 40px;
    text-align: center;
}

.recent-order-actions .btn-secondary,
.recent-order-actions .btn.btn-secondary {
    background: transparent;
    color: #cc1616;
    border: 2px solid #cc1616;
}

.recent-order-actions .btn-secondary:hover,
.recent-order-actions .btn.btn-secondary:hover {
    background: #cc1616;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(204, 22, 22, 0.25);
    transform: translateY(-2px);
}

.recent-order-actions .btn-sm {
    padding: 6px 14px;
    font-size: 0.75rem;
}

@media (max-width: 767px) {
    .recent-order-actions {
        flex-direction: column;
        padding-top: 12px;
    }

    .recent-order-actions .btn {
        width: 100%;
    }
}
