/* Clean My Account Dashboard - Sidebar Layout */

/* Hide breadcrumb navigation on My Account pages */
.woocommerce-breadcrumb,
.breadcrumb,
.breadcrumbs,
.woocommerce-breadcrumb * {
    display: none !important;
}

/* Override any theme padding classes that might interfere */
.my-account-layout .p-8,
.my-account-layout .md\:p-12,
.my-account-layout [class*="p-8"],
.my-account-layout [class*="md:p-12"] {
    padding: 0 !important;
}

/* Cart Popup Optimizations for Faster Response - REMOVED TO PREVENT CONFLICTS */

/* Ensure footer is properly separated - MORE AGGRESSIVE */
.my-account-layout + footer,
.my-account-layout ~ footer,
footer {
    margin-top: 3rem !important;
    border-top: 3px solid #e5e7eb !important;
    padding-top: 2rem !important;
    position: relative !important;
    clear: both !important;
    display: block !important;
    width: 100% !important;
}

/* Force footer outside any containers */
.my-account-layout {
    position: relative;
    z-index: 1;
}

footer {
    position: relative !important;
    z-index: 2 !important;
    margin-top: 3rem !important;
    border-top: 3px solid #e5e7eb !important;
    padding-top: 2rem !important;
}

/* Debug: Add visual separation */
.my-account-layout::after {
    content: '';
    display: block;
    height: 3rem;
    background: linear-gradient(to bottom, transparent, #f3f4f6);
    margin-top: 2rem;
    border-radius: 0 0 8px 8px;
}

/* CSS Reset for My Account */
.my-account-layout * {
    box-sizing: border-box;
}

/* Main Layout Container */
.my-account-layout {
    max-width: 1200px;
    margin: 2rem auto;
    display: flex;
    gap: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    padding: 0 1rem;
}

/* Left Sidebar Navigation */
.account-sidebar {
    flex: 0 0 250px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item:hover {
    background: #e5e7eb;
    color: #374151;
    text-decoration: none;
}

.nav-item.active {
    background: #8b5cf6;
    color: white;
}

.nav-text {
    flex: 1;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* Main Content Area */
.account-main {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.main-content {
    padding: 2rem;
}

/* Page Titles */
.page-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 2rem 0;
    color: #374151;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #8b5cf6;
}

/* Dashboard Welcome - Clean */
.dashboard-welcome {
    text-align: left;
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border-bottom: none;
}

.dashboard-welcome h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #374151;
}

.dashboard-welcome p {
    color: #6b7280;
    margin: 0;
    font-size: 1rem;
}

/* Recent Orders Summary - Clean */
.recent-orders-summary {
    margin-bottom: 2rem;
    padding: 0;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.summary-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    color: #374151;
}

.view-all-link {
    display: inline-block;
    color: #8b5cf6;
    text-decoration: underline;
    font-weight: 500;
    transition: none;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    font-size: 0.9rem;
}

.view-all-link:hover {
    color: #7c3aed;
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

.orders-grid {
    display: block;
    gap: 0;
}

.order-card {
    background: transparent;
    padding: 1rem 0;
    border-radius: 0;
    border: none;
    transition: none;
    position: static;
    overflow: visible;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.order-card::before {
    display: none;
}

.order-card:hover {
    transform: none;
    box-shadow: none;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.order-number {
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.order-status {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-processing {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-pending {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-cancelled {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.status-draft {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.order-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.order-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #374151;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: none;
    text-align: center;
    width: auto;
    border: none;
    cursor: pointer;
}

.order-link:hover {
    background: #1f2937;
    color: white;
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

/* Quick Actions - Clean */
.quick-actions {
    margin-bottom: 2rem;
    padding: 0;
}

.quick-actions h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #374151;
}

.actions-grid {
    display: block;
    gap: 0;
}

.action-card {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    color: #374151;
    transition: none;
    text-align: left;
    position: static;
    overflow: visible;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.action-card::before {
    display: none;
}

.action-card:hover {
    border-color: #8b5cf6;
    transform: none;
    box-shadow: none;
    text-decoration: none;
    color: #374151;
    background: #f8f9fa;
}

.action-icon {
    display: none;
}

.action-text {
    font-weight: 500;
    font-size: 0.9rem;
    position: static;
}

/* Orders Page Styling */
.orders-page {
    padding: 0;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.order-item:hover {
    border-color: #8b5cf6;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-number {
    font-weight: 600;
    color: #374151;
    font-size: 1.1rem;
}

.order-date {
    color: #6b7280;
    font-size: 0.9rem;
}

.order-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-total {
    font-weight: 600;
    color: #374151;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
}

/* Downloads Page Styling */
.downloads-page {
    padding: 0;
}

.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-item {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease;
}

.download-item:hover {
    border-color: #8b5cf6;
}

.download-info {
    flex: 1;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
}

.download-description {
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.download-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

.download-actions {
    flex-shrink: 0;
}

.download-expired {
    color: #dc2626;
    font-weight: 500;
}

/* Addresses Page Styling */
.addresses-page {
    padding: 0;
}

.addresses-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.address-section {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

.address-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #d1d5db;
}

.address-content {
    margin-bottom: 1rem;
}

.address-display {
    color: #374151;
    line-height: 1.6;
}

.no-address {
    color: #6b7280;
    font-style: italic;
}

.address-actions {
    text-align: center;
}

/* Payment Methods Page Styling */
.payment-methods-page {
    padding: 0;
}

.payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-method-item {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease;
}

.payment-method-item:hover {
    border-color: #8b5cf6;
}

.method-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.method-icon {
    color: #8b5cf6;
    flex-shrink: 0;
}

.method-details {
    flex: 1;
}

.method-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.25rem 0;
}

.method-description {
    color: #6b7280;
    margin: 0 0 0.25rem 0;
}

.method-expiry {
    color: #9ca3af;
    font-size: 0.85rem;
    margin: 0;
}

.method-actions {
    flex-shrink: 0;
}

/* No Content States */
.no-orders,
.no-downloads,
.no-address,
.no-payment-methods {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-orders p,
.no-downloads p,
.no-address p,
.no-payment-methods p {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
}

/* Edit Account Form Styling */
.edit-account-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.form-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #8b5cf6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group .required {
    color: #dc2626;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #374151;
    background: white;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: #8b5cf6;
    color: white;
}

.btn-primary:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Newsletter Form Styling - Clean */
.newsletter-form {
    position: static;
}

.newsletter-form input[type="email"] {
    transition: none;
}

.newsletter-form input[type="email"]:focus {
    border-color: #8b5cf6;
    box-shadow: none;
}

.newsletter-form button[type="submit"] {
    transition: none;
}

.newsletter-form button[type="submit"]:hover:not(:disabled) {
    transform: none;
    box-shadow: none;
}

.newsletter-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#newsletter-message {
    transition: none;
    padding: 0.5rem;
    border-radius: 3px;
}

#newsletter-message.text-green-400 {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
}

#newsletter-message.text-red-400 {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
}

/* Loading Animation */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive Design */
@media (max-width: 1024px) {
    .my-account-layout {
        margin: 1rem;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .account-sidebar {
        flex: 0 0 220px;
        padding: 1.25rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .addresses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .my-account-layout {
        flex-direction: column;
        margin: 0.5rem;
        gap: 1rem;
        padding: 0;
    }
    
    .account-sidebar {
        flex: none;
        width: 100%;
        position: static;
        padding: 1rem;
    }
    
    .account-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        text-align: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .nav-text {
        order: 1;
    }
    
    .nav-icon {
        order: 2;
        margin-left: 0.5rem;
    }
    
    .account-main {
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid #e5e7eb;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .dashboard-welcome {
        padding: 0;
        margin-bottom: 1.5rem;
    }
    
    .dashboard-welcome h2 {
        font-size: 1.6rem;
    }
    
    .dashboard-welcome p {
        font-size: 0.9rem;
    }
    
    .recent-orders-summary {
        padding: 0;
        margin-bottom: 1.5rem;
    }
    
    .orders-grid {
        gap: 0;
    }
    
    .order-card {
        padding: 0.75rem 0;
    }
    
    .summary-header h3 {
        font-size: 1.3rem;
    }
    
    .view-all-link {
        font-size: 0.9rem;
        padding: 0;
    }
    
    .quick-actions {
        padding: 0;
        margin-bottom: 1.5rem;
    }
    
    .quick-actions h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .actions-grid {
        gap: 0;
    }
    
    .action-card {
        padding: 0.5rem 0.75rem;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .form-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .form-section-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .order-item,
    .download-item,
    .address-section,
    .payment-method-item {
        padding: 1rem;
    }
    
    .order-header,
    .download-item,
    .payment-method-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .order-actions,
    .download-actions,
    .method-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .my-account-layout {
        margin: 0.25rem;
        gap: 0.75rem;
    }
    
    .account-sidebar {
        padding: 0.75rem;
    }
    
    .account-nav {
        gap: 0.25rem;
    }
    
    .nav-item {
        min-width: 100px;
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .dashboard-welcome {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .dashboard-welcome h2 {
        font-size: 1.4rem;
    }
    
    .dashboard-welcome p {
        font-size: 0.9rem;
    }
    
    .recent-orders-summary {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .orders-grid {
        gap: 0;
    }
    
    .order-card {
        padding: 0.5rem 0;
    }
    
    .quick-actions {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .quick-actions h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .actions-grid {
        gap: 0;
    }
    
    .action-card {
        padding: 0.4rem 0.6rem;
        margin-right: 0.4rem;
        margin-bottom: 0.4rem;
    }
    
    .action-text {
        font-size: 0.8rem;
    }
    
    .form-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .form-section-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-input {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .page-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .order-item,
    .download-item,
    .address-section,
    .payment-method-item {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .my-account-layout {
        margin: 0.125rem;
    }
    
    .account-sidebar {
        padding: 0.5rem;
    }
    
    .account-nav {
        gap: 0.25rem;
    }
    
    .nav-item {
        min-width: 80px;
        padding: 0.4rem 0.2rem;
        font-size: 0.75rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .dashboard-welcome {
        padding: 0;
    }
    
    .dashboard-welcome h2 {
        font-size: 1.3rem;
    }
    
    .dashboard-welcome p {
        font-size: 0.8rem;
    }
    
    .recent-orders-summary {
        padding: 0;
    }
    
    .quick-actions {
        padding: 0;
    }
    
    .quick-actions h3 {
        font-size: 1.1rem;
    }
    
    .actions-grid {
        gap: 0;
    }
    
    .action-card {
        padding: 0.3rem 0.5rem;
        margin-right: 0.3rem;
        margin-bottom: 0.3rem;
    }
    
    .action-icon {
        display: none;
    }
    
    .action-text {
        font-size: 0.75rem;
    }
    
    .form-section {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .form-section-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-input {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .page-title {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .order-item,
    .download-item,
    .address-section,
    .payment-method-item {
        padding: 0.5rem;
    }
}
