/* My Account Page Styles */

/* Main Container */
.my-account-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 140px 20px;
}

.my-account-container {
    margin-top: 20px;
}

/* Account Header */
.account-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.account-header-content h1 {
    color: var(--white);
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.account-header-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
}

.account-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: var(--white);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Account Content Layout */
.account-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

/* Account Sidebar Navigation */
.account-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin: 0;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
}

.woocommerce-MyAccount-navigation ul li a i {
    width: 20px;
    text-align: center;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.woocommerce-MyAccount-navigation ul li a:hover i {
    color: var(--primary-color);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--primary-color);
    color: var(--white);
}

.woocommerce-MyAccount-navigation ul li.is-active a i {
    color: var(--white);
}

/* Main Content Area */
.account-main-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    min-height: 500px;
}

.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 24px;
}

.woocommerce-MyAccount-content h2 {
    font-size: 24px;
}

.woocommerce-MyAccount-content h3 {
    font-size: 20px;
}

/* Dashboard */
.account-dashboard h2 {
    margin-bottom: 24px;
}

.dashboard-welcome {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    border-right: 4px solid var(--primary-color);
}

.dashboard-welcome p {
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.8;
}

.dashboard-welcome p:last-child {
    margin-bottom: 0;
}

.dashboard-welcome a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.dashboard-welcome a:hover {
    text-decoration: underline;
}

/* Dashboard Section */
.dashboard-section {
    margin-bottom: 32px;
}

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

.dashboard-section-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.dashboard-section-header .view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dashboard-section-header .view-all:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Dashboard Orders Grid */
.dashboard-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-order-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-order-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.order-card-header {
    padding: 16px;
    background: var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.order-number {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.order-number i {
    color: var(--primary-color);
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.order-status.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.order-status.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.order-status.status-on-hold {
    background: #fef3c7;
    color: #92400e;
}

.order-status.status-cancelled,
.order-status.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.order-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    font-size: 14px;
}

.order-info-item i {
    width: 16px;
    color: var(--text-light);
}

.order-card-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.order-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.order-view-btn:hover {
    color: var(--primary-dark);
    gap: 12px;
}

/* Dashboard Empty State */
.dashboard-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.dashboard-empty-state i {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.dashboard-empty-state h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.dashboard-empty-state p {
    color: var(--text-light);
    margin-bottom: 24px;
}

.shop-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.shop-now-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 24px;
    color: var(--white);
}

.stat-content h4 {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    margin: 0 0 4px 0;
}

.stat-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.woocommerce-MyAccount-content p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 16px;
}

.woocommerce-MyAccount-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.woocommerce-MyAccount-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Orders Table */
.woocommerce-orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 24px;
}

.woocommerce-orders-table thead {
    background: var(--bg-light);
}

.woocommerce-orders-table thead th {
    padding: 16px;
    text-align: right;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
    border-bottom: 2px solid var(--border-color);
}

.woocommerce-orders-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.woocommerce-orders-table tbody tr:hover {
    background: var(--bg-light);
}

.woocommerce-orders-table tbody td {
    padding: 16px;
    color: var(--text-dark);
    font-size: 14px;
}

.woocommerce-orders-table .woocommerce-orders-table__cell-order-number a {
    font-weight: 600;
    color: var(--primary-color);
}

.woocommerce-orders-table .woocommerce-button {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.woocommerce-orders-table .woocommerce-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Order Status Badge */
.woocommerce-orders-table__cell-order-status mark {
    background: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.woocommerce-orders-table__cell-order-status mark.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.woocommerce-orders-table__cell-order-status mark.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.woocommerce-orders-table__cell-order-status mark.status-on-hold {
    background: #fef3c7;
    color: #92400e;
}

.woocommerce-orders-table__cell-order-status mark.status-cancelled,
.woocommerce-orders-table__cell-order-status mark.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Forms */
.woocommerce-MyAccount-content form {
    margin-bottom: 24px;
}

.woocommerce-form-row {
    margin-bottom: 20px;
}

.woocommerce-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.woocommerce-form-row .required {
    color: #ef4444;
    margin-right: 4px;
}

.woocommerce-Input,
.woocommerce-form-row input[type="text"],
.woocommerce-form-row input[type="email"],
.woocommerce-form-row input[type="password"],
.woocommerce-form-row input[type="tel"],
.woocommerce-form-row select,
.woocommerce-form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: 'Moltaqa', sans-serif;
    transition: all 0.3s ease;
    background: var(--white);
}

.woocommerce-Input:focus,
.woocommerce-form-row input:focus,
.woocommerce-form-row select:focus,
.woocommerce-form-row textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.woocommerce-Button,
.woocommerce-form-row button[type="submit"],
.woocommerce-MyAccount-content .button {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Moltaqa', sans-serif;
}

.woocommerce-Button:hover,
.woocommerce-form-row button[type="submit"]:hover,
.woocommerce-MyAccount-content .button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Addresses */
.woocommerce-Addresses {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.woocommerce-Address {
    background: var(--bg-light);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.woocommerce-Address:hover {
    border-color: var(--primary-color);
}

.woocommerce-Address-title h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
}

.woocommerce-Address address {
    font-style: normal;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.woocommerce-Address .edit {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.woocommerce-Address .edit:hover {
    text-decoration: underline;
}

/* Messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.woocommerce-message {
    background: #d1fae5;
    color: #065f46;
    border-right: 4px solid #10b981;
}

.woocommerce-info {
    background: #dbeafe;
    color: #1e40af;
    border-right: 4px solid #3b82f6;
}

.woocommerce-error {
    background: #fee2e2;
    color: #991b1b;
    border-right: 4px solid #ef4444;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 18px;
}

.woocommerce-message::before {
    content: "\f058";
}

.woocommerce-info::before {
    content: "\f05a";
}

.woocommerce-error::before {
    content: "\f06a";
}

/* Empty State */
.woocommerce-Message--info {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.woocommerce-Message--info::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
    content: "\f05a";
    font-size: 48px;
    color: var(--text-light);
    display: block;
    margin-bottom: 16px;
}

/* Downloads */
.woocommerce-MyAccount-downloads {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.woocommerce-MyAccount-downloads thead {
    background: var(--bg-light);
}

.woocommerce-MyAccount-downloads thead th {
    padding: 16px;
    text-align: right;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
    border-bottom: 2px solid var(--border-color);
}

.woocommerce-MyAccount-downloads tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.woocommerce-MyAccount-downloads tbody td {
    padding: 16px;
    color: var(--text-dark);
    font-size: 14px;
}

.woocommerce-MyAccount-downloads .download-file a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Payment Methods */
.woocommerce-PaymentMethods {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.woocommerce-PaymentMethod {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid var(--border-color);
}

.woocommerce-PaymentMethod .payment-method-details {
    flex: 1;
}

.woocommerce-PaymentMethod .payment-method-actions {
    display: flex;
    gap: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .account-content {
        grid-template-columns: 240px 1fr;
        gap: 24px;
    }

    .account-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .my-account-main {
        padding: 0 16px 140px 16px;
    }

    .account-header {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }

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

    .account-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .account-sidebar {
        position: static;
        width: 100%;
    }

    .account-main-content {
        padding: 24px 20px;
    }

    .woocommerce-Addresses {
        grid-template-columns: 1fr;
    }

    /* Make tables scrollable on mobile */
    .woocommerce-orders-table,
    .woocommerce-MyAccount-downloads {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .woocommerce-orders-table thead,
    .woocommerce-orders-table tbody,
    .woocommerce-orders-table tr,
    .woocommerce-orders-table th,
    .woocommerce-orders-table td {
        display: table;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .account-main-content {
        padding: 20px 16px;
    }

    .woocommerce-Button,
    .woocommerce-form-row button[type="submit"],
    .woocommerce-MyAccount-content .button {
        width: 100%;
    }

    .woocommerce-PaymentMethod {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .woocommerce-PaymentMethod .payment-method-actions {
        width: 100%;
        flex-direction: column;
    }

    .woocommerce-PaymentMethod .payment-method-actions .button {
        width: 100%;
    }

    /* Dashboard mobile adjustments */
    .dashboard-orders-grid {
        grid-template-columns: 1fr;
    }

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

    .stat-card {
        padding: 20px;
    }

    .stat-content h4 {
        font-size: 24px;
    }
}
