/**
 * Accore My Account Styles
 *
 * @package Accore
 */

/* My Account Page Layout */
.accore-myaccount-page .woocommerce-MyAccount-navigation,
.accore-myaccount-page .woocommerce-MyAccount-content {
    font-family: 'Inter', sans-serif;
}

/* Navigation */
.accore-myaccount-page .woocommerce-MyAccount-navigation {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.accore-myaccount-page .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.accore-myaccount-page .woocommerce-MyAccount-navigation ul li {
    margin-bottom: 4px;
}

.accore-myaccount-page .woocommerce-MyAccount-navigation ul li:last-child {
    margin-bottom: 0;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.accore-myaccount-page .woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(19, 52, 59, 0.8);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.accore-myaccount-page .woocommerce-MyAccount-navigation ul li a:hover {
    background: rgba(78, 11, 98, 0.05);
    color: #4e0b62;
}

.accore-myaccount-page .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #4e0b62;
    color: #fff;
}

/* Content Area */
.accore-myaccount-page .woocommerce-MyAccount-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Dashboard Styles */
.accore-dashboard__welcome {
    margin-bottom: 32px;
}

.accore-dashboard__welcome h2 {
    font-size: 24px;
    font-weight: 600;
    color: #13343b;
    margin: 0 0 8px 0;
}

.accore-dashboard__welcome p {
    font-size: 14px;
    color: rgba(19, 52, 59, 0.7);
    margin: 0;
    line-height: 1.6;
}

/* Stats Cards */
.accore-dashboard__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.accore-stat-card {
    background: linear-gradient(135deg, #fcfcf9 0%, #f5f5f0 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.accore-stat-card__icon {
    width: 48px;
    height: 48px;
    background: #4e0b62;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.accore-stat-card__icon svg {
    color: #fff;
}

.accore-stat-card__content {
    display: flex;
    flex-direction: column;
}

.accore-stat-card__value {
    font-size: 24px;
    font-weight: 600;
    color: #13343b;
    line-height: 1.2;
}

.accore-stat-card__label {
    font-size: 13px;
    color: rgba(19, 52, 59, 0.6);
    margin-top: 4px;
}

/* Recent Orders */
.accore-dashboard__recent-orders h3 {
    font-size: 18px;
    font-weight: 600;
    color: #13343b;
    margin: 0 0 20px 0;
}

.accore-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.accore-orders-table th,
.accore-orders-table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
}

.accore-orders-table th {
    background: #f8f8f6;
    color: rgba(19, 52, 59, 0.7);
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.accore-orders-table th:first-child {
    border-radius: 8px 0 0 8px;
}

.accore-orders-table th:last-child {
    border-radius: 0 8px 8px 0;
}

.accore-orders-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #13343b;
}

.accore-orders-table tr:last-child td {
    border-bottom: none;
}

.accore-order-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.accore-order-status--processing {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.accore-order-status--completed {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.accore-order-status--pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.accore-order-status--on-hold {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.accore-order-status--cancelled,
.accore-order-status--failed {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.accore-link {
    color: #4e0b62;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.accore-link:hover {
    text-decoration: underline;
}

.accore-no-orders {
    text-align: center;
    padding: 40px;
    color: rgba(19, 52, 59, 0.6);
    font-size: 14px;
}

/* Buttons */
.accore-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.accore-btn-primary {
    background: #4e0b62;
    color: #fff;
}

.accore-btn-primary:hover {
    background: #3a0849;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 11, 98, 0.3);
}

.accore-btn-secondary {
    background: rgba(78, 11, 98, 0.1);
    color: #4e0b62;
}

.accore-btn-secondary:hover {
    background: rgba(78, 11, 98, 0.15);
}

.accore-btn-outline {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #13343b;
}

.accore-btn-outline:hover {
    border-color: #4e0b62;
    color: #4e0b62;
}

/* Section Header */
.accore-section-header {
    margin-bottom: 32px;
}

.accore-section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #13343b;
    margin: 0 0 8px 0;
}

.accore-section-header p {
    font-size: 14px;
    color: rgba(19, 52, 59, 0.6);
    margin: 0;
}

/* Empty State */
.accore-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.accore-empty-icon {
    width: 80px;
    height: 80px;
    background: rgba(78, 11, 98, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.accore-empty-icon svg {
    color: #4e0b62;
}

.accore-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #13343b;
    margin: 0 0 8px 0;
}

.accore-empty-state p {
    font-size: 14px;
    color: rgba(19, 52, 59, 0.6);
    margin: 0 0 24px 0;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Wishlist Grid */
.accore-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.accore-wishlist-item {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.accore-wishlist-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.accore-wishlist-item__image {
    position: relative;
    aspect-ratio: 1;
    background: #f8f8f6;
}

.accore-wishlist-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.accore-wishlist-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.accore-wishlist-item:hover .accore-wishlist-remove {
    opacity: 1;
}

.accore-wishlist-remove:hover {
    background: #dc2626;
    color: #fff;
}

.accore-wishlist-item__details {
    padding: 16px;
}

.accore-wishlist-item__title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.accore-wishlist-item__title a {
    color: #13343b;
    text-decoration: none;
}

.accore-wishlist-item__title a:hover {
    color: #4e0b62;
}

.accore-wishlist-item__price {
    font-size: 16px;
    font-weight: 600;
    color: #13343b;
    margin-bottom: 12px;
}

.accore-wishlist-item__price del {
    color: rgba(19, 52, 59, 0.5);
    font-weight: 400;
    font-size: 14px;
}

.accore-wishlist-item__price ins {
    text-decoration: none;
    color: #dc2626;
}

.accore-out-of-stock {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
}

/* Coupons Grid */
.accore-coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.accore-coupon-card {
    display: flex;
    background: linear-gradient(135deg, #fcfcf9 0%, #f5f5f0 100%);
    border: 1px dashed rgba(78, 11, 98, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.accore-coupon-card__discount {
    flex: 0 0 100px;
    background: #4e0b62;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    padding: 20px;
    text-align: center;
}

.accore-coupon-card__details {
    flex: 1;
    padding: 20px;
}

.accore-coupon-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #13343b;
    margin: 0 0 4px 0;
}

.accore-coupon-card__description {
    font-size: 13px;
    color: rgba(19, 52, 59, 0.6);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.accore-coupon-card__code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    color: #4e0b62;
}

.accore-copy-code {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: rgba(19, 52, 59, 0.5);
    transition: color 0.2s;
}

.accore-copy-code:hover {
    color: #4e0b62;
}

.accore-coupon-card__expiry {
    font-size: 12px;
    color: rgba(19, 52, 59, 0.5);
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 991px) {
    .accore-dashboard__stats {
        grid-template-columns: 1fr;
    }
    
    .accore-orders-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .accore-myaccount-page .woocommerce-MyAccount-content {
        padding: 24px;
    }
    
    .accore-wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .accore-coupons-grid {
        grid-template-columns: 1fr;
    }
    
    .accore-coupon-card {
        flex-direction: column;
    }
    
    .accore-coupon-card__discount {
        flex: none;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .accore-wishlist-grid {
        grid-template-columns: 1fr;
    }
    
    .accore-myaccount-page .woocommerce-MyAccount-content {
        padding: 16px;
    }
}

/* ========================================
   Shared Chats Section
   ======================================== */

.accore-account__card--shared-chats {
    margin-top: 24px;
}

.accore-account__card--shared-chats .accore-account__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accore-shared-chats__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(49, 184, 198, 0.15);
    color: #20808d;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.accore-account__card--shared-chats .accore-account__card-content {
    padding-top: 16px;
}

.accore-shared-chats__empty {
    color: rgba(19, 52, 59, 0.6);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.accore-shared-chats__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accore-shared-chats__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: #f8f8f6;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.accore-shared-chats__item:hover {
    background: #f0f0ec;
}

.accore-shared-chats__item.is-removing {
    opacity: 0;
    transform: translateX(-10px);
}

.accore-shared-chats__info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.accore-shared-chats__title {
    font-size: 14px;
    font-weight: 500;
    color: #13343b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.accore-shared-chats__date {
    font-size: 13px;
    color: rgba(19, 52, 59, 0.5);
    white-space: nowrap;
}

.accore-shared-chats__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.accore-shared-chats__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(19, 52, 59, 0.12);
    border-radius: 8px;
    background: #fff;
    color: rgba(19, 52, 59, 0.6);
    cursor: pointer;
    transition: all 0.15s ease;
}

.accore-shared-chats__btn:hover {
    border-color: rgba(19, 52, 59, 0.2);
    background: #fff;
    color: #13343b;
}

.accore-shared-chats__btn--copy.is-copied {
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.accore-shared-chats__btn--delete:hover {
    border-color: rgba(220, 53, 69, 0.3);
    background: rgba(220, 53, 69, 0.05);
    color: #dc3545;
}

.accore-shared-chats__btn.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

.accore-shared-chats__btn.is-loading svg {
    animation: accore-spin 1s linear infinite;
}

@keyframes accore-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .accore-shared-chats__item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 14px;
    }
    
    .accore-shared-chats__info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
    }
    
    .accore-shared-chats__actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .accore-shared-chats__title {
        font-size: 13px;
    }
}

