/**
 * WooCommerce Custom Dashboard Styles
 * Premium, modern design with enhanced readability
 */

/* ===== Global Styles ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
}

/* ===== Premium Navbar Styles ===== */
.navbar {
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Inter', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.nav-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-link.active {
    opacity: 1;
    color: #fff !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 8px;
    right: 8px;
    height: 3px;
    background: #FFD700;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.navbar-brand i {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Add icons effect on hover */
.woocommerce-MyAccount-navigation-link a::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #2563eb;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.woocommerce-MyAccount-navigation-link.is-active a::before,
.woocommerce-MyAccount-navigation-link a:hover::before {
    opacity: 1;
}

/* ===== Content Area Styles ===== */
.woocommerce-MyAccount-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: -20px;
    /* Slight overlap for premium look if needed, or keep 0 */
    position: relative;
    z-index: 10;
}

/* ===== Typography Enhancements ===== */
.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    color: #1a202c;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.woocommerce-MyAccount-content h2 {
    font-size: 2rem;
    /* 32px */
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1rem;
}

.woocommerce-MyAccount-content h3 {
    font-size: 1.5rem;
    /* 24px */
    margin-top: 2rem;
}

/* ===== Button Styles ===== */
.woocommerce-MyAccount-content .button,
.woocommerce-MyAccount-content button,
.woocommerce-MyAccount-content .btn {
    font-size: 2rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.woocommerce-MyAccount-content .button:hover,
.woocommerce-MyAccount-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ===== Table Styles ===== */
.woocommerce-MyAccount-content table {
    font-size: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.woocommerce-MyAccount-content table th {
    font-size: 1.0625rem;
    /* 17px */
    font-weight: 600;
    background: #f7fafc;
    color: #2d3748;
}

.woocommerce-MyAccount-content table td {
    font-size: 1rem;
    padding: 1rem;
}

/* ===== Form Styles ===== */
.woocommerce-MyAccount-content form label {
    font-size: 1rem;
    font-weight: 500;
    color: #2d3748;
}

.woocommerce-MyAccount-content form input[type="text"],
.woocommerce-MyAccount-content form input[type="email"],
.woocommerce-MyAccount-content form input[type="password"],
.woocommerce-MyAccount-content form select,
.woocommerce-MyAccount-content form textarea {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.woocommerce-MyAccount-content form input:focus,
.woocommerce-MyAccount-content form select:focus,
.woocommerce-MyAccount-content form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Birth Chart Specific Form Styling */
#createChartForm {
    font-size: 16px !important;
}

#createChartForm .form-control,
#createChartForm .form-select,
#createChartForm .input-group-text,
#createChartForm label,
#createChartForm .btn {
    font-size: 16px !important;
}

#createChartForm .btn-group .btn {
    width: auto !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    min-width: 45px;
}

#createChartForm small,
#createChartForm .small {
    font-size: 14px !important;
}

/* ===== Dashboard Wrapper ===== */
.dashboard-wrapper {
    background: #f7fafc;
    min-height: 100vh;
}

/* ===== Header Enhancements ===== */
header.border-bottom {
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

header .fs-4 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .woocommerce-MyAccount-navigation {
        margin-bottom: 2rem;
        position: static;
    }

    .woocommerce-MyAccount-navigation-link a {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    .woocommerce-MyAccount-content {
        padding: 1.5rem;
    }

    .woocommerce-MyAccount-content h2 {
        font-size: 1.5rem;
    }
}

/* ===== Smooth Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woocommerce-MyAccount-content {
    animation: fadeIn 0.4s ease-out;
}

/* ===== Utility Classes ===== */
.text-muted {
    color: #718096 !important;
}

.border-bottom {
    border-bottom: 1px solid #e2e8f0 !important;
}

/* ===== Report Section Styles ===== */

/* Report Header */
.report-header {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e8eeff;
}

.report-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.5px;
}

.report-meta span {
    font-size: 0.85rem;
}

.report-gender-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

/* Report Tabs */
.report-tabs-wrapper {
    position: relative;
    border-bottom: 2px solid #e2e8f0;
}

.report-tabs-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, #fff);
    pointer-events: none;
    z-index: 2;
}

.report-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.25rem;
    padding-bottom: 2px;
}

.report-tabs::-webkit-scrollbar {
    display: none;
}

.report-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    border-radius: 8px 8px 0 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    border-bottom: none;
    position: relative;
}

.report-tab:hover {
    color: #4f46e5;
    background: #f8f9ff;
}

.report-tab.active {
    color: #4f46e5;
    background: #fff;
    border-color: #e2e8f0;
    font-weight: 600;
}

.report-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #4f46e5;
}

.report-tab i {
    font-size: 1rem;
}

/* Report Cards */
.report-card {
    background: #fff;
    border: 1px solid #e8eeff;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.report-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.report-card-header {
    background: #f8f9ff;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    color: #334155;
    border-bottom: 1px solid #e8eeff;
    display: flex;
    align-items: center;
}

.report-card-header i {
    color: #4f46e5;
}

.report-card-header-success {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-color: #bbf7d0;
}

.report-card-header-success i {
    color: #16a34a;
}

.report-card-header-warning {
    background: linear-gradient(135deg, #fffbeb, #fef9c3);
    border-color: #fde68a;
}

.report-card-header-warning i {
    color: #d97706;
}

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

/* Birth Detail Rows */
.birth-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.birth-detail-row:last-child {
    border-bottom: none;
}

.birth-detail-label {
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.birth-detail-value {
    font-weight: 500;
    color: #1e293b;
}

/* Chart Placeholder */
.chart-placeholder {
    padding: 2.5rem 1rem;
}

.chart-placeholder-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8eeff 0%, #f0f4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border: 2px dashed #c7d2fe;
}

.chart-placeholder-icon i {
    font-size: 2rem;
    color: #818cf8;
}

.chart-placeholder-text {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Planetary Positions Table */
.report-planets-table {
    font-size: 0.875rem;
}

.report-planets-table thead th {
    background: #f8f9ff;
    color: #64748b;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e8eeff;
}

.report-planets-table tbody td {
    padding: 0.7rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.report-planets-table tbody tr:hover {
    background: #fafbff;
}

.planet-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.planet-symbol {
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8eeff, #f0f4ff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
}

.house-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #f1f5f9;
    font-weight: 600;
    font-size: 0.8rem;
    color: #475569;
}

.retrograde-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #dc2626;
    background: #fef2f2;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.direct-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: #16a34a;
    background: #f0fdf4;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Report Content */
.report-summary-text {
    line-height: 1.7;
    color: #475569;
}

.report-subheading {
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.report-theme-list,
.report-trait-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-theme-list li,
.report-trait-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.5rem 0;
    color: #475569;
    line-height: 1.5;
}

.report-theme-list li i {
    color: #4f46e5;
    font-size: 0.85rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.report-trait-list li i {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Quick Nav */
.report-quick-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.15s ease;
}

.report-quick-nav-item:last-child {
    border-bottom: none;
}

.report-quick-nav-item:hover {
    background: #f8f9ff;
    color: #4f46e5;
}

.report-quick-nav-item i:first-child {
    color: #818cf8;
    font-size: 1rem;
}

.report-quick-nav-item .bi-chevron-right {
    font-size: 0.7rem;
    color: #cbd5e1;
}
/* Refresh Button */
.report-refresh-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.report-refresh-btn:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
    background: #f8f9ff;
}

.report-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.report-refresh-spinning {
    animation: reportRefreshSpin 0.8s linear infinite;
}

@keyframes reportRefreshSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Inline Strengths/Challenges (inside main card) */
.report-inline-section {
    padding: 0.75rem;
    border-radius: 8px;
    height: 100%;
}

.report-inline-strengths {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1px solid #bbf7d0;
}

.report-inline-challenges {
    background: linear-gradient(135deg, #fffbeb, #fef9c3);
    border: 1px solid #fde68a;
}

/* ===== Report Responsive ===== */

/* AI-generated HTML content styling */
.report-html-content {
    line-height: 1.7;
    color: #475569;
}

.report-html-content h2,
.report-html-content h3,
.report-html-content h4,
.report-html-content h5,
.report-html-content h6 {
    color: #1e293b;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.report-html-content h2 {
    font-size: 1.25rem;
}

.report-html-content h3 {
    font-size: 1.1rem;
}

.report-html-content p {
    margin-bottom: 0.75rem;
}

.report-html-content ul,
.report-html-content ol {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.report-html-content li {
    margin-bottom: 0.35rem;
}

.report-html-content strong {
    color: #334155;
}

/* Tablet breakpoint */
@media (max-width: 991px) {
    .report-header .d-flex {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .report-gender-badge {
        order: -1;
        margin-left: auto;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Report header: stack vertically */
    .report-header {
        padding: 1rem;
    }

    .report-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .report-header .btn-outline {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .report-name {
        font-size: 1.25rem;
    }

    .report-meta {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }

    .report-meta .mx-2 {
        display: none;
    }

    .report-gender-badge {
        display: none;
    }

    /* Tabs: compact and scrollable */
    .report-tabs-wrapper {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .report-tab {
        padding: 0.5rem 0.65rem;
        font-size: 0.78rem;
    }

    .report-tab i {
        font-size: 0.9rem;
    }

    .report-tab span {
        display: none;
    }

    .report-tab.active span {
        display: inline;
    }

    /* Cards: reduce padding */
    .report-card-body {
        padding: 1rem;
    }

    .report-card-header {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Table tweaks */
    .report-planets-table thead th,
    .report-planets-table tbody td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .planet-symbol {
        width: 24px;
        height: 24px;
        font-size: 0.95rem;
    }

    /* Summary text */
    .report-summary-text {
        font-size: 0.92rem;
    }

    .report-theme-list li,
    .report-trait-list li {
        font-size: 0.9rem;
    }

    /* Chart placeholder */
    .chart-placeholder {
        padding: 1.5rem 0.5rem;
    }

    /* Loader */
    .report-loader {
        padding: 2rem 0.5rem;
    }

    .report-loader-spinner {
        width: 64px;
        height: 64px;
    }

    .report-loader-bar {
        width: 160px;
    }

    /* Strengths/challenges stack on mobile */
    .report-card-strengths,
    .report-card-challenges {
        margin-bottom: 0;
    }

    /* Lord positions table on mobile */
    .table-responsive {
        font-size: 0.8rem;
    }

    /* Quick nav on mobile */
    .report-quick-nav-item {
        padding: 0.65rem 1rem;
        font-size: 0.8rem;
    }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
    .report-name {
        font-size: 1.1rem;
    }

    .report-tab {
        padding: 0.45rem 0.55rem;
        font-size: 0.75rem;
    }

    .report-card-body {
        padding: 0.85rem;
    }

    .report-summary-text {
        font-size: 0.88rem;
        line-height: 1.6;
    }

    .report-planets-table thead th,
    .report-planets-table tbody td {
        padding: 0.4rem 0.45rem;
        font-size: 0.75rem;
    }

    .planet-symbol {
        width: 22px;
        height: 22px;
        font-size: 0.85rem;
    }

    .house-badge {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .birth-detail-label,
    .birth-detail-value {
        font-size: 0.85rem;
    }
}

/* ===== Report Loader Styles ===== */

.report-loader {
    text-align: center;
    padding: 3rem 1rem;
}

/* Spinner with rings */
.report-loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.report-loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: reportRingSpin 2s linear infinite;
}

.report-loader-ring:nth-child(1) {
    border-top-color: #818cf8;
    animation-duration: 2s;
}

.report-loader-ring:nth-child(2) {
    inset: 6px;
    border-right-color: #c084fc;
    animation-duration: 2.5s;
    animation-direction: reverse;
}

.report-loader-ring:nth-child(3) {
    inset: 12px;
    border-bottom-color: #f0abfc;
    animation-duration: 3s;
}

.report-loader-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #818cf8;
    animation: reportIconPulse 2s ease-in-out infinite;
}

@keyframes reportRingSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes reportIconPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.9);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Rotating messages */
.report-loader-messages {
    position: relative;
    height: 1.5em;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.report-loader-msg {
    position: absolute;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.5s ease;
    color: #64748b;
    font-weight: 500;
}

.report-loader-msg.active {
    opacity: 1;
    transform: translateY(0);
}

/* Progress bar */
.report-loader-bar {
    width: 200px;
    height: 4px;
    background: #e8eeff;
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
}

.report-loader-bar-inner {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #818cf8, #c084fc, #818cf8);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: reportBarSlide 1.5s ease-in-out infinite;
}

@keyframes reportBarSlide {
    0% {
        transform: translateX(-100%);
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 0%;
    }

    100% {
        transform: translateX(350%);
        background-position: 0% 0%;
    }
}

/* Fade transitions */
.report-loader-fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

.report-content-fade-in {
    animation: reportContentIn 0.5s ease forwards;
}

@keyframes reportContentIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}