/* ============================================================
   CUSTOM MY ACCOUNT DESIGN
   Path: /assets/css/my-account.css
   ============================================================ */

/* Base Wrapper */
.custom-account-wrapper {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 1. PROFILE CARD */
.ca-profile-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    overflow: hidden;
}

.ca-profile-top {
    background: #1a4f4a;
    padding: 24px 30px;
    display: flex;
    align-items: center;
    position: relative;
}

.ca-avatar-img {
    border-radius: 50%;
    width: 64px;
    height: 64px;
    border: 2px solid rgba(255,255,255,0.2);
    margin-right: 20px;
}

.ca-user-info h2 {
    color: #fff;
    font-size: 20px;
    margin: 0 0 4px 0;
    font-weight: 600;
}

.ca-user-info p {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin: 0;
}

.ca-edit-profile {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.ca-edit-profile a {
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 5;
}

.ca-edit-profile a:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.ca-profile-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 24px 30px;
}

.ca-detail-box {
    display: flex;
    flex-direction: column;
}

.ca-detail-box.full-width {
    grid-column: span 2;
}

.ca-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ca-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

/* Profile quick action buttons */
.ca-profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 30px 24px;
}

.ca-profile-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    background: #ff5a00;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.ca-profile-edit-btn:hover {
    background: #143d39;
    color: #fff;
}

.ca-profile-edit-btn.ghost {
    background: #f1f5f9;
    color: #1e293b;
}

.ca-profile-edit-btn.ghost:hover {
    background: #e2e8f0;
}

/* 2. ORDERS CARD */
.ca-orders-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    overflow: hidden;
}

.ca-section-title {
    padding: 20px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.ca-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #f1f5f9;
    padding: 0 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ca-tabs::-webkit-scrollbar {
    display: none;
}

.ca-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    flex: 0 0 auto;
}

.ca-tab svg {
    flex: 0 0 auto;
    margin-top: -1px;
}

.ca-tab:hover {
    color: #1e293b;
}

.ca-tab.active {
    color: #1e293b;
    border-bottom-color: #1e293b;
    font-weight: 500;
}

.ca-tab-content {
    padding: 30px 20px;
}

/* Tab Pane Animation */
.ca-tab-pane {
    animation: caFadeIn 0.3s ease-in-out;
}

@keyframes caFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Empty State */
.ca-empty-state {
    text-align: center;
    color: #64748b;
}

.ca-empty-state svg {
    margin: 0 auto 16px;
}

.ca-empty-state p {
    margin: 4px 0;
    font-size: 14px;
}

.ca-empty-state .ca-subtext {
    font-size: 13px;
    color: #94a3b8;
}

/* 3. LOGOUT BUTTON */
.ca-logout-wrapper {
    text-align: center;
}

.ca-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.ca-logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* 4. ORDER LIST */
.ca-order-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ca-order-item {
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow 0.2s;
}

.ca-order-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ca-order-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1e293b;
}

.ca-order-status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    background: #e2e8f0;
    text-transform: capitalize;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.ca-order-status.status-processing       { background: #fef08a; color: #854d0e; }
.ca-order-status.status-completed        { background: #bbf7d0; color: #166534; }
.ca-order-status.status-cancelled        { background: #fecaca; color: #991b1b; }
.ca-order-status.status-on-hold          { background: #fed7aa; color: #9a3412; }
.ca-order-status.status-pending          { background: #fde68a; color: #92400e; }
.ca-order-status.status-failed           { background: #fecaca; color: #991b1b; }
.ca-order-status.status-refunded         { background: #e2e8f0; color: #334155; }

/* Custom statuses: Delivery Processing / Delivery Completed */
.ca-order-status.status-delivery-process { background: #e0f2fe; color: #075985; }
.ca-order-status.status-delivery-done    { background: #ede9fe; color: #5b21b6; }

.ca-order-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #64748b;
    margin-top: 5px;
    width: 100%;
}

.ca-view-order {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: underline;
}

.ca-view-order:hover {
    color: #0f172a;
}

@media (min-width: 600px) {
    .ca-order-item { flex-wrap: nowrap; }
    .ca-order-meta { width: auto; margin-top: 0; flex-direction: column; gap: 2px; text-align: right; }
    .ca-view-order { margin-top: 0; }
}

/* ============================================================
   5. ENDPOINT CARD (edit-account / edit-address / view-order)
   ============================================================ */
.ca-endpoint-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    padding: 22px 30px 30px;
}

.ca-endpoint-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    margin-bottom: 22px;
    border-bottom: 1px solid #f1f5f9;
}

.ca-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #ff5a00;
    text-decoration: none;
}

.ca-back-link:hover {
    text-decoration: underline;
}

.ca-endpoint-nav {
    list-style: none;
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.ca-endpoint-nav a {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.ca-endpoint-nav a:hover {
    color: #1e293b;
    text-decoration: underline;
}

/* WooCommerce endpoint content inside our card */
.ca-endpoint-content h2,
.ca-endpoint-content h3 {
    color: #1e293b;
}

.ca-endpoint-content p,
.ca-endpoint-content label {
    font-size: 14px;
    color: #334155;
}

.ca-endpoint-content .form-row {
    margin-bottom: 16px;
}

.ca-endpoint-content .form-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.ca-endpoint-content input.input-text,
.ca-endpoint-content select,
.ca-endpoint-content textarea,
.ca-endpoint-content .select2-container .select2-selection--single {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    color: #1e293b;
}

.ca-endpoint-content input.input-text:focus,
.ca-endpoint-content select:focus,
.ca-endpoint-content textarea:focus {
    border-color: #1a4f4a;
    outline: none;
}

.ca-endpoint-content .button,
.ca-endpoint-content button.button,
.ca-endpoint-content .woocommerce-Button {
    background: #1a4f4a;
    color: #fff;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.ca-endpoint-content .button:hover {
    background: #143d39;
    color: #fff;
}

.ca-endpoint-content .woocommerce-Addresses .woocommerce-Address {
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 18px;
}

/* ============================================================
   6. RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .ca-profile-details {
        grid-template-columns: 1fr;
    }
    .ca-detail-box.full-width {
        grid-column: span 1;
    }
    .ca-profile-top {
        padding: 20px;
    }
    .ca-profile-actions {
        padding: 0 20px 20px;
    }
    .ca-section-title {
        padding: 15px 20px;
    }
    .ca-tabs {
        padding: 0 10px;
    }
    .ca-endpoint-card {
        padding: 18px 20px 22px;
    }
}

/* ============================================================
   HIDE DEFAULT TITLE & BREADCRUMB ON MY ACCOUNT PAGE
   ============================================================ */
.custom-my-account-wrap .woocommerce-breadcrumb,
.custom-my-account-wrap .aisourcemart-breadcrumb,
body.woocommerce-account .page-header,
body.woocommerce-account .entry-title,
body.woocommerce-account header.page-header,
body.woocommerce-account .woocommerce-breadcrumb,
.woocommerce-account .woocommerce-breadcrumb,
.woocommerce-account h1.entry-title {
    display: none !important;
}
