/**
 * My Account Page Styles
 *
 * @package Qatarshoes
 * @since 2.1.0
 */

/* ========================================
   LOGIN PROMPT (NOT LOGGED IN)
   ======================================== */
.account-login-prompt {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.login-prompt-content {
    text-align: center;
    max-width: 400px;
}

.login-prompt-icon {
    width: 80px;
    height: 80px;
    stroke: #ccc;
    margin-bottom: 24px;
}

.login-prompt-content h1 {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.login-prompt-content p {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px 0;
}

.login-prompt-btn {
    width: 100%;
    padding: 14px 24px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.login-prompt-btn:hover {
    background: #333;
}

.login-prompt-register {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.login-prompt-register .text-link {
    background: none;
    border: none;
    color: #1a1a1a;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

/* ========================================
   ACCOUNT DASHBOARD
   ======================================== */
.account-dashboard {
    padding: 40px 20px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.account-header {
    margin-bottom: 32px;
}

.account-header h1 {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 32px;
    font-weight: 400;
    margin: 0 0 8px 0;
}

.account-welcome {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.account-welcome strong {
    color: #1a1a1a;
}

/* ========================================
   TABS NAVIGATION
   ======================================== */
.account-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 32px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.account-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.account-tab:hover {
    color: #1a1a1a;
}

.account-tab.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

.account-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ========================================
   ACCOUNT CONTENT
   ======================================== */
.account-content {
    min-height: 400px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header h2 {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    margin: 0;
}

.section-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.section-link:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

/* ========================================
   OVERVIEW TAB
   ======================================== */
.overview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: #1a1a1a;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

.stat-label {
    font-size: 13px;
    color: #888;
}

.stat-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.stat-link:hover {
    text-decoration: underline;
}

.overview-section {
    margin-bottom: 40px;
}

.recent-orders {
    display: grid;
    gap: 16px;
}

.order-preview-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.order-preview-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-number {
    font-weight: 600;
    color: #1a1a1a;
}

.order-date {
    font-size: 13px;
    color: #888;
}

.order-preview-total {
    font-weight: 600;
    font-size: 15px;
}

.account-info-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 14px;
}

.info-value {
    font-weight: 500;
    color: #1a1a1a;
}

/* ========================================
   ORDERS TAB
   ======================================== */
.orders-list {
    display: grid;
    gap: 16px;
}

.order-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px 24px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-status {
    display: flex;
    gap: 8px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.financial-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.financial-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.financial-refunded {
    background: #fce4ec;
    color: #c62828;
}

.status-badge.fulfillment-fulfilled {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge.fulfillment-unfulfilled,
.status-badge.fulfillment-partial {
    background: #f5f5f5;
    color: #666;
}

.order-items {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.item-name {
    color: #1a1a1a;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-delivery-mode {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
}

.total-label {
    color: #666;
    margin-right: 8px;
}

.total-value {
    font-weight: 600;
    font-size: 16px;
}

/* ========================================
   WISHLIST TAB
   ======================================== */
.item-count {
    font-size: 14px;
    color: #888;
    font-weight: normal;
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.wishlist-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, opacity 0.3s;
}

.wishlist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wishlist-card-link {
    text-decoration: none;
    color: inherit;
}

.wishlist-card-image {
    aspect-ratio: 3/4;
    background: #f5f5f5;
    overflow: hidden;
}

.wishlist-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-card-info {
    padding: 16px;
}

.wishlist-card-vendor {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.wishlist-card-title {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
}

.wishlist-card-price {
    font-size: 14px;
    font-weight: 600;
}

.wishlist-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.wishlist-add-cart-btn {
    flex: 1;
    padding: 10px 16px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.wishlist-add-cart-btn:hover {
    background: #333;
}

.wishlist-remove-btn {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wishlist-remove-btn:hover {
    background: #fce4ec;
}

.wishlist-remove-btn svg {
    width: 18px;
    height: 18px;
    stroke: #666;
}

.wishlist-remove-btn:hover svg {
    stroke: #c62828;
}

/* ========================================
   ADDRESSES TAB
   ======================================== */
.add-address-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-address-btn svg {
    width: 16px;
    height: 16px;
}

.addresses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.address-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.address-card.is-default {
    border-color: #1a1a1a;
}

.default-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.address-label {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.address-name {
    font-weight: 500;
    margin-bottom: 8px;
}

.address-line {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.address-phone {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.address-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.address-actions button {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
}

.address-actions button:hover {
    color: #1a1a1a;
}

.delete-address-btn:hover {
    color: #c62828 !important;
}

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

.address-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.address-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
}

.address-modal-header h3 {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    margin: 0;
}

.address-modal-close {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.address-modal-close:hover {
    background: #f5f5f5;
}

.address-modal-close svg {
    width: 20px;
    height: 20px;
}

.address-form {
    padding: 24px;
}

/* ========================================
   PROFILE TAB
   ======================================== */
.profile-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e8e8e8;
}

.profile-section:last-child {
    border-bottom: none;
}

.profile-form {
    max-width: 500px;
}

.danger-zone {
    background: #fff5f5;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #ffcccc;
}

.danger-zone .section-header h2 {
    color: #c62828;
}

.danger-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.btn-danger {
    padding: 12px 24px;
    background: #c62828;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.5;
}

.small-text {
    font-size: 12px;
    color: #888;
    margin-top: 12px;
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-row {
    margin-bottom: 20px;
}

.form-row.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a1a1a;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary {
    padding: 12px 24px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #333;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 12px 24px;
    background: #f5f5f5;
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.form-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.form-message.error {
    background: #fce4ec;
    color: #c62828;
}

.password-strength {
    font-size: 12px;
    margin-top: 6px;
    min-height: 18px;
}

.password-strength.weak {
    color: #c62828;
}

.password-strength.medium {
    color: #e65100;
}

.password-strength.strong {
    color: #2e7d32;
}

/* ========================================
   EMPTY & LOADING STATES
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-family: 'Canela Text', Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
}

.empty-state .btn-primary {
    display: inline-block;
    text-decoration: none;
}

.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.error-state {
    text-align: center;
    padding: 40px 20px;
    color: #c62828;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.no-data a {
    color: #1a1a1a;
}

/* ========================================
   LOGOUT BUTTON
   ======================================== */
.account-logout {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    border-color: #c62828;
    color: #c62828;
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .account-dashboard {
        padding: 24px 16px 60px;
    }

    .account-header h1 {
        font-size: 26px;
    }

    .account-tabs {
        gap: 0;
        margin-bottom: 24px;
    }

    .account-tab {
        padding: 12px 14px;
        font-size: 13px;
    }

    .account-tab svg {
        display: none;
    }

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

    .order-header {
        flex-direction: column;
        gap: 12px;
    }

    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .addresses-list {
        grid-template-columns: 1fr;
    }

    .form-row.two-col {
        grid-template-columns: 1fr;
    }

    .address-modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wishlist-card {
        border-radius: 6px;
    }

    .wishlist-card-image {
        aspect-ratio: 1/1;
    }

    .wishlist-card-info {
        padding: 10px;
    }

    .wishlist-card-vendor {
        font-size: 9px;
        margin-bottom: 2px;
    }

    .wishlist-card-title {
        font-size: 12px;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .wishlist-card-price {
        font-size: 12px;
    }

    .wishlist-card-actions {
        flex-direction: column;
        padding: 0 10px 10px;
        gap: 6px;
    }

    .wishlist-add-cart-btn {
        padding: 8px 10px;
        font-size: 11px;
    }

    .wishlist-remove-btn {
        padding: 8px;
        width: 100%;
        justify-content: center;
    }

    .wishlist-remove-btn svg {
        width: 14px;
        height: 14px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .order-preview-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
