/* WooCommerce My Account Custom Redesign */

/* Main Wrapper */
.custom-my-account-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

/* Sidebar Navigation */
.custom-my-account-sidebar {
    flex: 0 0 280px;
    background-color: #f6f3eb;
    border-radius: 12px;
    padding: 20px 0;
    height: 100%;
}

.custom-user-profile {
    display: flex;
    align-items: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 15px;
}

.custom-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

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

.custom-user-info {
    flex: 1;
}

.custom-user-name {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.custom-user-email {
    margin: 0;
    font-size: 13px;
    color: #666;
}

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

.custom-navigation li {
    margin-bottom: 5px;
    padding: 0 15px;
}

.custom-navigation li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.custom-navigation li a svg {
    margin-right: 15px;
    flex-shrink: 0;
}

.custom-navigation li a .chevron-icon {
    margin-left: auto;
    margin-right: 0;
    width: 14px;
    height: 14px;
}

.custom-navigation li a:hover,
.custom-navigation li.is-active a {
    background-color: #2c4a3b;
    /* Dark green from screenshot */
    color: #fff;
}

.custom-my-account-wrapper .password-input {
    width: 100%;
}

.custom-my-account-wrapper .form-row {
    gap: 0;
}

/* Content Area */
.woocommerce-MyAccount-content.custom-my-account-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #E7F2DF;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

/* Dashboard Welcome */
.custom-dashboard-welcome {
    margin-bottom: 30px;
}

.welcome-heading {
    margin: 0 0 10px;
    font-size: 20px;
    color: #2c4a3b;
    /* Match active tab color */
    font-weight: 600;
}

.welcome-text {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Quick Action Cards */
.custom-dashboard-action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    background: #fff;
}

.action-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: #d1d1d1;
    transform: translateY(-2px);
}

.action-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #eaf1e8;
    /* Light green icon background */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #2c4a3b;
}

.action-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Hide default WooCommerce dashboard paragraphs if they appear */
.custom-my-account-content>p:nth-child(1),
.custom-my-account-content>p:nth-child(2) {
    display: none;
}

.custom-my-account-wrapper .woocommerce-MyAccount-navigation {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-my-account-wrapper {
        flex-direction: column;
    }

    .custom-my-account-sidebar {
        flex: none;
        width: 100%;
    }

    .custom-dashboard-action-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .custom-dashboard-action-cards {
        grid-template-columns: 1fr;
    }
}

/* Account Details Form Styling */
.custom-edit-account-form {
    background: #fff;
    width: 100%;
}

.custom-form-title {
    font-size: 16px;
    font-weight: 600;
    color: #304b3b;
    margin: 0 0 20px;
    text-align: left;
}

.password-change-title {
    margin-top: 30px;
}

.custom-edit-account-form .form-row {
    margin-bottom: 20px;
    width: 100%;
    float: none;
    display: flex !important;
    flex-direction: column !important;
}

.custom-edit-account-form .form-row label {
    display: block;
    font-size: 14px;
    color: #304b3b;
    margin-bottom: 8px;
    font-weight: 500;
    text-align: left;
    width: 100%;
}

.custom-edit-account-form .input-text {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px !important;
    border: 1px solid #0000004D !important;
    border-radius: 100px !important;
    font-size: 14px;
    color: #666;
    outline: none;
    box-sizing: border-box;
    background: #fff;
    line-height: 20px !important;
}

.custom-edit-account-form .input-text:focus {
    border-color: #2c4a3b !important;
}

.custom-form-row-split {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.custom-form-row-split .form-row {
    flex: 1;
    min-width: 200px;
}

/* Password Toggle Visibility Fix */
.custom-edit-account-form .woocommerce-form-row {
    position: relative;
}

.custom-edit-account-form .show-password-input {
    top: 40px;
    right: 15px;
}

.custom-form-submit-row {
    text-align: center;
    margin-top: 30px;
    width: 100%;
    display: block;
}

button.custom-save-btn,
.custom-edit-account-form button[name="save_account_details"] {
    background-color: #000 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 40px !important;
    border-radius: 30px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
    display: inline-block;
}

button.custom-save-btn:hover,
.custom-edit-account-form button[name="save_account_details"]:hover {
    background-color: #333 !important;
}

/* Custom Addresses Section */
.custom-address-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.custom-address-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.custom-address-card,
.custom-add-address-card {
    flex: 1;
    min-width: 300px;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.custom-address-card .card-header {
    display: flex;
    margin-bottom: 15px;
}

.custom-radio {
    display: block;
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    user-select: none;
    margin-right: 10px;
}

.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-address-cards-container .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #999;
    border-radius: 50%;
}

.custom-radio input:checked~.checkmark {
    border-color: #2c4a3b;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-radio input:checked~.checkmark:after {
    display: block;
}

.custom-radio .checkmark:after {
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2c4a3b;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 10px 0 0;
}

.address-badge {
    background-color: #A05B53;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.address-badge.billing {
    background-color: #A05B53;
}

.address-badge.shipping {
    background-color: #a36f6f;
    /* Reddish for office/shipping */
}

.card-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.card-actions a {
    color: #2c4a3b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.address-text {
    font-size: 14px;
    color: #555;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.card-body .phone-text,
.card-body .delivery-text,
.card-body .cod-text {
    font-size: 16px;
    color: #000000CC;
    margin: 0 0 5px 0;
    font-weight: 400;
}

.delivery-text {
    color: #2c4a3b;
}

.custom-add-address-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
}

.custom-add-address-card:hover {
    background-color: #f9f9f9;
}

.add-icon-wrapper {
    margin-bottom: 10px;
}

.custom-add-address-card p {
    font-size: 16px;
    color: #2c4a3b;
    font-weight: 500;
    margin: 0;
}

.custom-my-account-wrapper form .form-row-first,
.custom-my-account-wrapper form .form-row-last {
    width: 50%;
}

.custom-address-wrapper p.address-text {
    text-align: left;
    display: ruby;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #000000CC;
}

/* Custom Address Modal */
.custom-address-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.custom-address-modal-overlay[style*="display: block"],
.custom-address-modal-overlay[style*="display: inline-block"],
.custom-address-modal-overlay[style*="display: flex"] {
    display: flex !important;
}

.custom-address-modal-content {
    background-color: #f6f3eb;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.custom-address-modal-content .modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--color-primary);
}

.custom-address-modal-content .form-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.custom-address-modal-content label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.custom-address-modal-content .input-text {
    width: 100%;
    padding: 12px !important;
    border: 1px solid var(--color-primary) !important;
    border-radius: 100px !important;
    outline: none;
    font-size: 16px;
}

.custom-address-modal-content .input-text:focus {
    border-color: #2c4a3b;
}

.custom-address-modal-content .custom-form-row-split {
    display: flex;
    gap: 15px;
}

.custom-address-modal-content .custom-form-row-split .form-row {
    flex: 1;
}

.custom-address-modal-content .custom-checkbox-row {
    margin-top: 10px;
}

.custom-address-modal-content .modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.custom-address-modal-content .btn-cancel {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.3s;
}

.custom-address-modal-content .btn-cancel {
    background-color: #f2efe7;
    color: #111;
    border: 1px solid #e1e1e1;
}

.custom-address-modal-content .btn-cancel:hover {
    background-color: #e5e2da;
}


.custom-address-modal-content .success {
    color: green;
}

.custom-address-modal-content .error {
    color: red;
}

/* Custom Orders Listing */

.custom-orders-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c4a3b;
    margin-top: 0;
    margin-bottom: 10px;
}

.custom-orders-desc {
    font-size: 14px;
    color: #333;
    margin-bottom: 25px;
}

.custom-orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 25px;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
}

.custom-orders-table th {
    padding: 15px;
    text-align: left;
    font-weight: 500;
    font-size: 15px;
    color: #111;
    border-bottom: 1px solid #e1e1e1;
}

.custom-orders-table td {
    padding: 15px;
    border-bottom: 1px solid #e1e1e1;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
}

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

.custom-orders-table .order-number {
    font-weight: 600;
    color: #111;
}

.custom-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: transparent;
    border-radius: 6px;
    transition: background 0.3s;
}

.custom-action-icon:hover {
    background-color: #e5e2da;
}

.custom-pagination {
    display: flex;
    justify-content: space-between;
}

/* Custom View Order Details */
.custom-view-order-wrapper {
    background: transparent;
}

.custom-view-order-header {
    margin-bottom: 25px;
}

.custom-order-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c4a3b;
    margin-top: 0;
    margin-bottom: 8px;
}

.custom-order-desc {
    font-size: 14px;
    color: #333;
    margin-bottom: 15px;
}

.custom-order-number {
    font-size: 15px;
    color: #2c4a3b;
    font-weight: 600;
    margin: 0;
}

.custom-view-order-layout {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.custom-view-order-items {
    flex: 1 1 60%;
    background: #f6f3eb;
    /* Beige background for items section based on screenshot */
    border-radius: 12px;
    padding: 25px;
}

.order-items-box .box-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c4a3b;
    margin-top: 0;
    margin-bottom: 20px;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-order-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.custom-order-item .item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.custom-order-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-order-item .item-details {
    flex-grow: 1;
}

.custom-order-item .item-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c4a3b;
    margin: 0 0 5px 0;
}

.custom-order-item .item-meta {
    font-size: 13px;
    color: #555;
    margin: 0 0 5px 0;
}

.custom-order-item .item-qty-price {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    margin: 0;
}

.custom-view-order-sidebar {
    flex: 1 1 30%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-box {
    background: #f6f3eb;
    /* Beige */
    border-radius: 12px;
    padding: 25px;
}

.sidebar-box .box-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c4a3b;
    margin-top: 0;
    margin-bottom: 20px;
}

.price-details-box .price-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #111;
    margin-bottom: 12px;
}

.price-details-box .discount-row span:last-child {
    color: #ea004b;
}

.price-details-box .grand-total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
    font-weight: 600;
    font-size: 16px;
}

.billing-address-box .billing-details p {
    font-size: 14px;
    color: #111;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.billing-address-box .billing-name {
    font-size: 15px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .custom-view-order-layout {
        flex-direction: column;
    }

    .custom-view-order-items,
    .custom-view-order-sidebar {
        flex: 1 1 100%;
    }

    .custom-orders-table th,
    .custom-orders-table td {
        padding: 10px;
    }
}