/**
 * WooCommerce Account Pages
 * Seeed Studio theme — My Account, Login, Orders, Addresses, etc.
 */

/* ============================================================
   RESET: Override .entry-content styles inside account area
   ============================================================ */
.entry-content .seeed-myaccount-wrap ul,
.entry-content .seeed-myaccount-wrap ol {
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    list-style: none !important;
}
.entry-content .seeed-myaccount-wrap li {
    margin-bottom: 0 !important;
}

/* ============================================================
   OVERRIDE WooCommerce DEFAULT LAYOUT
   WC plugin CSS uses float + % width — we replace with flex.
   ============================================================ */
.woocommerce-MyAccount-navigation {
    float: none !important;
    width: auto !important;
}
.woocommerce-MyAccount-content {
    float: none !important;
    width: auto !important;
}

/* ============================================================
   LAYOUT: Sidebar + Content
   ============================================================ */
.seeed-myaccount-wrap {
    display: flex;
    gap: 2rem;
    max-width: 1260px;
    margin: 0 auto;
    padding: 2rem 0;
}
.seeed-myaccount-sidebar {
    flex: 0 0 240px;
    min-width: 240px;
    width: 240px;
    max-width: 100%;
}
.seeed-myaccount-content {
    flex: 1 1 0%;
    min-width: 0;
}

.seeed-myaccount-sidebar .woocommerce-MyAccount-navigation {
    display: block;
    float: none !important;
    width: 100% !important;
    max-width: 100%;
}

/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */
.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}
.woocommerce-MyAccount-navigation li {
    margin: 0 !important;
    list-style: none !important;
    width: 100%;
}
.woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s, color 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.woocommerce-MyAccount-navigation li:last-child a {
    border-bottom: none;
}
.woocommerce-MyAccount-navigation li a:hover {
    background: #f0f8e0;
    color: #8fc31f;
}
.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--active a {
    background: #8fc31f;
    color: #fff;
}
.woocommerce-MyAccount-navigation li.is-active a:hover,
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--active a:hover {
    background: #7aaa18;
    color: #fff;
}
.wc-nav-icon {
    display: inline-flex;
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px;
    justify-content: center;
    font-size: 0.95rem;
}
.wc-nav-label {
    flex: 1 1 auto;
    min-width: 0;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.seeed-dashboard__welcome {
    margin-bottom: 2rem;
}
.seeed-dashboard__welcome h3 {
    font-size: 1.35rem;
    margin: 0 0 0.5rem;
    color: #111827;
}
.seeed-dashboard__welcome p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
}
.seeed-dashboard__welcome a {
    color: #8fc31f;
    text-decoration: none;
    font-weight: 500;
}
.seeed-dashboard__welcome a:hover {
    text-decoration: underline;
}

/* Dashboard cards */
.seeed-dashboard__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.seeed-dashboard__card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.seeed-dashboard__card:hover {
    border-color: #8fc31f;
    box-shadow: 0 2px 8px rgba(143, 195, 31, 0.12);
    color: #374151;
}
.seeed-dashboard__card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f0f8e0;
    color: #8fc31f;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.seeed-dashboard__card-info h4 {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}
.seeed-dashboard__card-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* ============================================================
   AUTH: LOGIN / REGISTER
   ============================================================ */
.seeed-auth {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.seeed-auth__panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}
.seeed-auth__panel {
    padding: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}
.seeed-auth__panel h2 {
    font-size: 1.3rem;
    margin: 0 0 0.35rem;
    color: #111827;
}
.seeed-auth__subtitle {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0 0 1.5rem;
}
.seeed-auth__options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}
.seeed-auth__options label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: #374151;
}
.seeed-auth__forgot {
    color: #8fc31f;
    text-decoration: none;
    font-weight: 500;
}
.seeed-auth__forgot:hover {
    text-decoration: underline;
}
.seeed-auth__auto-pass {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ============================================================
   ORDERS TABLE
   ============================================================ */
.woocommerce-MyAccount-content .woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.woocommerce-orders-table thead th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}
.woocommerce-orders-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.woocommerce-orders-table tbody tr:hover {
    background: #fafafa;
}
.woocommerce-orders-table a {
    color: #8fc31f;
    text-decoration: none;
    font-weight: 500;
}
.woocommerce-orders-table a:hover {
    text-decoration: underline;
}

/* Order status badges */
.seeed-order-status {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.seeed-order-status--completed {
    background: #ecfdf5;
    color: #059669;
}
.seeed-order-status--processing {
    background: #eff6ff;
    color: #2563eb;
}
.seeed-order-status--on-hold {
    background: #fffbeb;
    color: #d97706;
}
.seeed-order-status--cancelled,
.seeed-order-status--refunded,
.seeed-order-status--failed {
    background: #fef2f2;
    color: #dc2626;
}
.seeed-order-status--pending {
    background: #f3f4f6;
    color: #6b7280;
}

/* ============================================================
   EMPTY STATE (no orders, no downloads, etc.)
   ============================================================ */
.seeed-empty-state {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    background: #fafafa;
}
.seeed-empty-state__icon {
    font-size: 2.5rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}
.seeed-empty-state p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 1.25rem;
}
.seeed-empty-state a.btn.btn-primary,
.seeed-empty-state a.btn.btn-primary:visited,
.seeed-empty-state a.btn.btn-primary:hover,
.seeed-empty-state a.btn.btn-primary:focus {
    color: #111827;
}

/* ============================================================
   ADDRESS CARDS
   ============================================================ */
.seeed-address-intro {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.seeed-addresses {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
.seeed-address-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}
.seeed-address-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.seeed-address-card__header h3 {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
    color: #111827;
}
.seeed-address-card address {
    font-style: normal;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ============================================================
   EDIT ACCOUNT & EDIT ADDRESS FORMS
   ============================================================ */
.seeed-form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.seeed-form-hint {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.seeed-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.seeed-fieldset legend {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
    padding: 0 0.5rem;
}

.seeed-edit-address h3 {
    font-size: 1.15rem;
    margin: 0 0 1.25rem;
    color: #111827;
}

/* WooCommerce generated form fields */
.woocommerce-address-fields .form-row {
    margin-bottom: 1rem;
}
.woocommerce-address-fields label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.35rem;
}
.woocommerce-address-fields .input-text,
.woocommerce-address-fields select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.15s;
}
.woocommerce-address-fields .input-text:focus,
.woocommerce-address-fields select:focus {
    outline: none;
    border-color: #8fc31f;
    box-shadow: 0 0 0 3px rgba(143, 195, 31, 0.15);
}

/* ============================================================
   WOO NOTICES INSIDE ACCOUNT
   ============================================================ */
.woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-error {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.woocommerce-MyAccount-content .woocommerce-message {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #059669;
}
.woocommerce-MyAccount-content .woocommerce-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}
.woocommerce-MyAccount-content .woocommerce-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}
.woocommerce-MyAccount-content .woocommerce-error li {
    list-style: none;
}

/* ============================================================
   BUTTON VARIANTS FOR ACCOUNT
   ============================================================ */
.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}
.btn-outline {
    background: transparent;
    color: #8fc31f;
    border: 1px solid #8fc31f;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s, color 0.15s;
}
.btn-outline:hover {
    background: #8fc31f;
    color: #fff;
}
.btn-full {
    width: 100%;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.woocommerce-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* ============================================================
   DOWNLOADS TABLE (reuses orders table styles)
   ============================================================ */
.woocommerce-MyAccount-content .woocommerce-table--order-downloads {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.woocommerce-table--order-downloads thead th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}
.woocommerce-table--order-downloads tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

/* ============================================================
   VIEW ORDER DETAIL
   ============================================================ */
.woocommerce-MyAccount-content .woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.woocommerce-table--order-details thead th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}
.woocommerce-table--order-details tbody td,
.woocommerce-table--order-details tfoot td,
.woocommerce-table--order-details tfoot th {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .seeed-myaccount-wrap {
        flex-direction: column;
    }
    .seeed-myaccount-sidebar {
        flex: none;
        width: 100%;
        min-width: 0;
    }
    .seeed-myaccount-sidebar .woocommerce-MyAccount-navigation {
        width: 100% !important;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .seeed-myaccount-sidebar .woocommerce-MyAccount-navigation ul {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
        width: max-content;
        min-width: 100%;
    }
    .seeed-myaccount-sidebar .woocommerce-MyAccount-navigation li {
        width: auto;
        flex: 0 0 auto;
    }
    .seeed-myaccount-sidebar .woocommerce-MyAccount-navigation li a {
        white-space: nowrap;
        border-bottom: none;
        border-right: 1px solid #f3f4f6;
        padding: 0.7rem 1rem;
        font-size: 0.82rem;
        width: auto;
    }
    .seeed-myaccount-sidebar .woocommerce-MyAccount-navigation li:last-child a {
        border-right: none;
    }
    .wc-nav-label {
        min-width: max-content;
    }
    .seeed-dashboard__cards {
        grid-template-columns: 1fr;
    }
    .seeed-auth__panels {
        grid-template-columns: 1fr;
    }
    .seeed-addresses {
        grid-template-columns: 1fr;
    }
    .seeed-form-row--half {
        grid-template-columns: 1fr;
    }
    /* Responsive table — stack on mobile */
    .woocommerce-orders-table thead {
        display: none;
    }
    .woocommerce-orders-table tbody tr {
        display: block;
        padding: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 0.75rem;
    }
    .woocommerce-orders-table tbody td {
        display: block;
        padding: 0.3rem 0;
        border-bottom: none;
        text-align: left;
    }
    .woocommerce-orders-table tbody td::before {
        content: attr(data-title) ": ";
        font-weight: 600;
        color: #374151;
    }
}
