/* Account Page Styles */

/* Account Navigation Styles */
.account-navigation {
    background: #ffffff;
    /* padding removed as it's handled by card body now */
}

.account-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #495057;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
    border-bottom: 1px solid #f1f3f5;
    margin-bottom: 0;
}

.account-nav-link:last-child {
    border-bottom: none;
}

.account-nav-link:hover,
.account-nav-link.active {
    background: var(--primary-light, rgba(255, 112, 25, 0.08));
    border-left-color: var(--primary-color, #ff7019);
    color: var(--primary-color, #ff7019);
}

/* Account Orders Table */
.orders-table-wrap {
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.orders-table {
    margin-bottom: 0 !important;
}

.orders-table thead th {
    background: #f8f9fa;
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #e9ecef;
}

.orders-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
}

.orders-table tbody tr:last-child td {
    border-bottom: none;
}

.orders-table tbody tr:hover {
    background-color: var(--primary-light, rgba(255, 112, 25, 0.04)) !important;
}

.orders-table tbody tr:nth-of-type(even) {
    background-color: #fafbfc;
}

.orders-table tbody tr:nth-of-type(even):hover {
    background-color: var(--primary-light, rgba(255, 112, 25, 0.06)) !important;
}

/* Order Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-badge p {
    margin: 0;
}

.status-badge-pending {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.status-badge-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.status-badge-processing {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.status-badge-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.status-badge-default {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
}

/* Action Icon Button */
.btn-icon-only {
    padding: 0.375rem 0.5rem;
    line-height: 1;
}

.btn-icon-only i {
    margin: 0 !important;
}

/* Order View - Items Table & Summary */
.order-items-table {
    table-layout: auto;
    min-width: 900px;
}

.order-items-table th:nth-child(1),
.order-items-table td:nth-child(1) {
    width: 12%;
    min-width: 140px;
}

.order-items-table th:nth-child(2),
.order-items-table td:nth-child(2) {
    width: 32%;
}

.order-items-table th:nth-child(3),
.order-items-table td:nth-child(3) {
    width: 14%;
}

.order-items-table th:nth-child(4),
.order-items-table td:nth-child(4) {
    width: 24%;
    min-width: 220px;
}

.order-items-table th:nth-child(5),
.order-items-table td:nth-child(5) {
    width: 18%;
}

/* Order View - Address blocks & general */
.order-address-block p,
.order-view-section p,
.order-shipping-payment-card p,
.orders-table .status-badge p {
    margin-bottom: 0;
}

/* Order View - Invoice Section */
.invoice-card .card-header {
    padding: 0.9rem 1.25rem;
}

.invoice-card .card-body {
    padding: 1.25rem;
}

.invoice-print-btn {
    white-space: nowrap;
}

.invoice-items-table .orders-table thead th {
    white-space: nowrap;
}

.invoice-summary-card {
    border-radius: 0.75rem;
    overflow: hidden;
}

.invoice-summary-card .card-header {
    border-bottom: 1px solid #e9ecef;
}

.invoice-summary-card .card-body .border-bottom:last-child {
    border-bottom: 0 !important;
}

/* Order View - Shipments Section */
.shipment-list {
    margin-top: 0.5rem;
}

.shipment-card .card-header {
    padding: 0.9rem 1.25rem;
}

.shipment-card .card-body {
    padding: 1.25rem;
}

.shipment-items-table .orders-table thead th {
    white-space: nowrap;
}

/* Order View - Tabs (Information / Invoices / Shipments / Refunds) */
#orderTabs.nav-tabs {
    border-bottom: 1px solid #e9ecef;
    gap: 0.5rem;
}

#orderTabs.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-bottom: 0;
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6c757d;
    background: transparent;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

#orderTabs.nav-tabs .nav-link:hover {
    color: var(--primary-color, #ff7019);
}

#orderTabs.nav-tabs .nav-link.active {
    color: #212529;
    background: #ffffff;
    border-color: #e9ecef;
    border-bottom-color: #ffffff;
}

#orderTabsContent {
    padding-top: 0.75rem;
}

.invoice-list {
    margin-top: 0.5rem;
}

/* Content Area */
.account-content {
    min-height: 60vh;
    /* padding handled by container */
}

/* Account forms (address, profile) – full section width, compact spacing */
.address-form-wrap {
    width: 100%;
    max-width: 100%;
}

.address-form-body .form-label {
    margin-bottom: 4px;
    font-size: 12px;
}

.address-form-body .form-control,
.address-form-body .form-select {
    padding: 0.4rem 0.6rem;
    font-size: 0.9375rem;
}

.customer-login-page {
    min-height: 100vh;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.signup-container {
    max-width: 600px;
}

/* Logo */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo a {
    display: inline-block;
}

.login-logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Login Card */
.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.login-card-header {
    background: #f97c30;
    padding: 32px 32px 28px;
    text-align: center;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

/* Card Body */
.login-card-body {
    padding: 32px;
}

/* Form Fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field-half {
    margin-bottom: 0;
}

/* Checkbox Sections */
.form-checkbox-section {
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-checkbox-section.gdpr-section {
    background: #fef3c7;
    border-color: #fbbf24;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label.required::after {
    content: " *";
    color: #dc3545;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #f97c30;
    box-shadow: 0 0 0 3px rgba(255, 45, 55, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-input {
    display: none;
}

.checkbox-icon {
    font-size: 20px;
    color: #f97c30;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-label {
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 14px;
    font-weight: 500;
    color: #f97c30;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #E01E2E;
    text-decoration: underline;
}

/* Login Button */
.login-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #f97c30;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(255, 45, 55, 0.2);
    margin-top: 8px;
}

.login-button:hover {
    background: #E01E2E;
    box-shadow: 0 4px 8px rgba(255, 45, 55, 0.3);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 45, 55, 0.2);
}

.login-button:focus {
    outline: 2px solid #f97c30;
    outline-offset: 2px;
}

/* Social Login */
.social-login-section {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Card Footer */
.login-card-footer {
    padding: 20px 32px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.register-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.register-link {
    color: #f97c30;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.register-link:hover {
    color: #E01E2E;
    text-decoration: underline;
}

/* Copyright */
.copyright-text {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 24px;
}

/* Wishlist Styles */
.wishlist-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
}

.wishlist-item:last-child {
    border-bottom: none;
}

.product-image {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 0.75rem;
}

.quantity-changer {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 2rem;
    padding: 0.375rem 0.75rem;
}

.quantity-changer button {
    background: none;
    border: none;
    padding: 0 0.5rem;
    cursor: pointer;
}

.quantity-changer input {
    border: none;
    width: 50px;
    text-align: center;
}

/* Order View Tabs */
.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .product-image {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 640px) {
    .customer-login-page {
        padding: 20px 16px;
    }

    .login-container {
        max-width: 100%;
    }

    .login-card-header {
        padding: 24px 20px 20px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-card-body {
        padding: 24px 20px;
    }

    .login-card-footer {
        padding: 16px 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

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

/* Button Styles */
.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: .875rem;
    border-radius: 0.2rem;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    color: #fff;
    background-color: #bb2d3b;
    border-color: #b02a37;
}

.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}
