/* 
  planer.css 
  Styling for the Interactive Hochzeitsplaner (Wizard & Dashboard)
*/

/* --- DARK MODE OVERRIDES FOR PLANER --- */
[data-theme="dark"] .wizard-card,
[data-theme="dark"] .dashboard-header,
[data-theme="dark"] .module-accordion {
    background: #1a1a1a;
    border-color: #333;
}

[data-theme="dark"] .wizard-option-card {
    background: #252525;
    border-color: #444;
}

[data-theme="dark"] .wizard-option-card:hover {
    border-color: var(--color-primary);
    background: #2a2a2a;
}

[data-theme="dark"] .check-input {
    background: #2c2c2c;
    border-color: #555;
}

[data-theme="dark"] .module-header {
    background: #1a1a1a;
}

[data-theme="dark"] .module-header:hover {
    background: #222;
}

[data-theme="dark"] .partner-item {
    background: rgba(243, 156, 18, 0.1);
}

[data-theme="dark"] .tool-item {
    background: rgba(52, 152, 219, 0.1);
}

[data-theme="dark"] .article-preview-tooltip {
    background: #252525;
    border-color: #444;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .check-item-wrapper.has-article .check-item {
    background: rgba(212, 175, 55, 0.1);
}

[data-theme="dark"] .check-item-wrapper.has-article:hover .check-item {
    background: rgba(212, 175, 55, 0.2);
}

[data-theme="dark"] .planer-main {
    background: var(--color-bg);
}

/* --- WIZARD / FRAGEBOGEN --- */
.planer-main {
    background: #fdfaf6;
    /* Very subtle warm background */
    min-height: 80vh;
}

.planer-hero {
    padding-bottom: var(--space-md);
}

.planer-subtitle {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--color-text-light);
}

.wizard-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--color-border);
}

.wizard-header {
    margin-bottom: var(--space-xl);
}

.step-counter {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.wizard-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.wizard-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    border-radius: var(--radius-pill);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-question-title {
    font-size: 2rem;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

.wizard-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.wizard-option-card {
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.wizard-option-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.15);
    transform: translateY(-2px);
}

.wizard-option-icon {
    font-size: 2.5rem;
}

.wizard-option-text {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text);
}


.wizard-footer {
    margin-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
}


/* --- DASHBOARD / MODULES --- */
.dashboard-section {
    max-width: 900px;
}

.dashboard-header {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-xl);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.dashboard-title-row {
    flex: 1 1 300px;
}

.dashboard-title-row h2 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
}

/* Circular Progress */
.dashboard-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--color-bg-alt);
    padding: 15px 25px;
    border-radius: var(--radius-md);
}

.stat-circle {
    width: 60px;
    height: 60px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 3.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.percentage {
    fill: var(--color-text);
    font-family: inherit;
    font-size: 8px;
    font-weight: 700;
    text-anchor: middle;
}

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
    margin: 0;
}


/* Accordions */
.module-accordion {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
    transition: box-shadow 0.2s ease;
}

.module-header {
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--color-surface);
    user-select: none;
}

.module-header:hover {
    background: #fcfaf8;
}

.module-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
    margin: 0;
}

.module-badge {
    background: var(--color-bg-alt);
    color: var(--color-text-light);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.module-toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--color-primary);
}

.module-accordion.open .module-toggle-icon {
    transform: rotate(180deg);
}

.module-content {
    display: none;
    padding: 0 25px 25px 25px;
    border-top: 1px solid var(--color-border);
}

.module-accordion.open .module-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Sections inside accordion (e.g. 1.1 Standard-Unterlagen) */
.module-section {
    margin-top: 20px;
}

.module-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary-dark);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.module-section h4::before {
    content: '▶';
    font-size: 0.8rem;
}

/* Sub-sections (▷ Bei Vorehe) */
.module-subsection-title {
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
    padding-left: 28px;
    font-style: italic;
    color: var(--color-text-light);
}

/* Custom Checkboxes */
.check-item {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.check-item:hover {
    background: var(--color-bg-alt);
}

.check-item.checked .check-label {
    text-decoration: line-through;
    color: var(--color-text-light);
}

.check-input {
    appearance: none;
    background-color: #fff;
    margin: 3px 15px 0 0;
    font: inherit;
    color: currentColor;
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.check-input::before {
    content: "";
    width: 12px;
    height: 12px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--color-primary);
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.check-input:checked {
    border-color: var(--color-primary);
}

.check-input:checked::before {
    transform: scale(1);
}

.check-label {
    flex: 1;
    font-size: 1rem;
    line-height: 1.4;
    user-select: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- ARTICLE CARD TOOLTIP (Hover) --- */
.check-item-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.check-item-wrapper.has-article .check-item {
    background: rgba(212, 175, 55, 0.05);
    /* very subtle gold background */
    border-left: 3px solid var(--color-primary);
}

.check-item-wrapper.has-article:hover .check-item {
    background: rgba(212, 175, 55, 0.15);
    /* Slightly darker gold on hover */
}

.article-preview-tooltip {
    position: absolute;
    bottom: 50%;
    /* Center relative to the check-item */
    left: 100%;
    /* Pop out to the right side */
    transform: translateX(-10px) translateY(50%);
    width: 250px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--color-border);
}

.check-item-wrapper.has-article:hover .article-preview-tooltip,
.article-preview-tooltip:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(15px) translateY(50%);
}

.article-preview-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.article-preview-text {
    padding: 12px;
}

.article-preview-badge {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-bottom: 5px;
}

.article-preview-title {
    display: block;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.article-preview-tooltip:hover .article-preview-title {
    color: var(--color-primary);
}

@media (max-width: 900px) {
    .article-preview-tooltip {
        left: 0;
        bottom: 100%;
        transform: translateY(10px);
    }

    .check-item-wrapper.has-article:hover .article-preview-tooltip {
        transform: translateY(0);
    }
}

.partner-section-title {
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--color-text-light);
    border-bottom: 1px dashed var(--color-border);
    padding-bottom: 5px;
}

.partner-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 15px;
    background: #fff8eb;
    /* Light orange/yellow tint */
    border-left: 4px solid #f39c12;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.partner-item .star-icon {
    font-size: 1.2rem;
}

.partner-item a {
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

.partner-item a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 15px;
    background: #f0f7f9;
    /* Light blue tint */
    border-left: 4px solid #3498db;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.tool-item .link-icon {
    font-size: 1.2rem;
}

.tool-item a {
    font-weight: 600;
    color: #2980b9;
    text-decoration: none;
}

.tool-item a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-stats {
        width: 100%;
        justify-content: center;
    }
}