/* Clerky - Custom Styles */

.nav-btn {
    color: #6b7280;
}

.nav-btn:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.nav-btn.active {
    background-color: #e0eaff;
    color: #0033cc;
    font-weight: 600;
}

/* Agenda Preview Formatting - matches Ellis County style */
.agenda-preview {
    max-width: 700px;
    margin: 0 auto;
    font-family: Calibri, Arial, sans-serif !important;
    font-size: 12px;
    line-height: 1.5;
    color: #000;
}

.agenda-preview .header {
    text-align: center;
    margin-bottom: 20px;
}

.agenda-preview .header h1 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.agenda-preview .header h2 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
}

.agenda-preview .members-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 4px;
}

.agenda-preview .notice {
    font-size: 12px;
    margin-bottom: 16px;
    text-align: justify;
}

.agenda-preview .section-title {
    font-weight: bold;
    font-size: 13px;
    margin-top: 16px;
    margin-bottom: 8px;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
}

.agenda-preview .agenda-item {
    margin-bottom: 8px;
    padding-left: 20px;
}

.agenda-preview .item-number {
    font-weight: bold;
}

.agenda-preview .item-official {
    font-style: italic;
    font-size: 11px;
}

/* Minutes Preview Formatting — Ellis County Style */
.minutes-preview {
    max-width: 720px;
    margin: 0 auto;
    font-family: Calibri, Arial, sans-serif !important;
    font-size: 12px;
    line-height: 1.5;
    color: #000;
    font-variant: small-caps;
}

.minutes-preview .minutes-seal {
    display: block;
    width: 60px;
    height: 60px;
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    margin: 0 auto 8px;
}

.minutes-preview .header {
    text-align: center;
    margin-bottom: 24px;
}

.minutes-preview .header h1 {
    font-size: 16px;
    font-weight: normal;
    font-variant: small-caps;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.minutes-preview .header h2 {
    font-size: 13px;
    font-weight: normal;
    font-variant: small-caps;
    margin-bottom: 0;
}

.minutes-preview .minute-order-ref {
    text-align: right;
    font-size: 11px;
    font-variant: normal;
    margin-bottom: 16px;
    color: #333;
}

.minutes-preview .section-title {
    font-weight: bold;
    font-variant: small-caps;
    text-decoration: underline;
    font-size: 12px;
    margin-top: 20px;
    margin-bottom: 8px;
}

.minutes-preview .section-title .mo-number {
    text-decoration: none;
    float: right;
    font-weight: bold;
}

.minutes-preview .subsection-title {
    font-weight: bold;
    font-variant: small-caps;
    text-decoration: underline;
    font-size: 11px;
    margin-top: 12px;
    margin-bottom: 6px;
    padding-left: 12px;
}

.minutes-preview .minutes-item {
    margin-bottom: 10px;
    padding-left: 48px;
    text-indent: -28px;
}

.minutes-preview .minutes-item .item-num {
    font-weight: bold;
    font-variant: small-caps;
    display: inline-block;
    width: 28px;
}

.minutes-preview .minutes-item .item-presenter {
    font-style: italic;
    font-variant: normal;
}

.minutes-preview .vote-record {
    font-variant: small-caps;
    font-weight: normal;
    margin: 4px 0 4px 20px;
    font-size: 11px;
}

.minutes-preview .mo-label {
    font-weight: bold;
    font-variant: small-caps;
}

.minutes-preview .members-section {
    margin-bottom: 16px;
}

.minutes-preview .members-section .members-label {
    font-weight: bold;
    font-variant: small-caps;
    text-decoration: underline;
    display: inline-block;
    min-width: 140px;
}

.minutes-preview .members-section .member-line {
    padding-left: 20px;
    margin: 2px 0;
}

.minutes-preview .signature-block {
    margin-top: 40px;
    page-break-inside: avoid;
}

.minutes-preview .sig-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 40px;
    margin-top: 20px;
}

.minutes-preview .sig-item {
    text-align: left;
}

.minutes-preview .sig-line {
    border-bottom: 1px solid #000;
    width: 240px;
    margin-top: 30px;
    margin-bottom: 4px;
}

.minutes-preview .attestation {
    margin-top: 30px;
    font-variant: small-caps;
}

.minutes-preview .attestation .seal-and-clerk {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 16px;
}

.minutes-preview .attestation .seal-img {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}

/* Drag & Drop */
.drag-over {
    border-color: #3366ff !important;
    background-color: #f0f5ff !important;
}

/* Meeting mode item cards */
.meeting-item-card {
    transition: all 0.2s;
}

.meeting-item-card.voted {
    border-left: 4px solid #22c55e;
}

.meeting-item-card.no-action {
    border-left: 4px solid #9ca3af;
}

/* Vote buttons */
.vote-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.vote-btn.motion {
    background-color: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}
.vote-btn.motion:hover { background-color: #bfdbfe; }

.vote-btn.second {
    background-color: #e0e7ff;
    color: #4338ca;
    border: 1px solid #a5b4fc;
}
.vote-btn.second:hover { background-color: #c7d2fe; }

.vote-btn.carried {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.vote-btn.carried:hover { background-color: #bbf7d0; }

.vote-btn.failed {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.vote-btn.failed:hover { background-color: #fecaca; }

.vote-btn.no-action-btn {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}
.vote-btn.no-action-btn:hover { background-color: #e5e7eb; }

.vote-btn.active {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background-color: #dcfce7;
    color: #166534;
}

.badge-deferred {
    background-color: #e0e7ff;
    color: #3730a3;
}

.badge-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Dropdown menu - keep visible on hover */
.group:hover .group-hover\:block {
    display: block !important;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.view:not(.hidden) {
    animation: fadeIn 0.2s ease-out;
}

/* Editable minutes */
.minutes-editable:focus {
    outline: none;
}
.minutes-editable [contenteditable]:hover,
.minutes-editable div:hover,
.minutes-editable span:hover {
    background-color: #fefce8;
    cursor: text;
}
.minutes-editable::selection,
.minutes-editable *::selection {
    background-color: #bfdbfe;
}

/* Minutes Quill Editor */
#minutes-editor .ql-editor {
    min-height: 600px;
    max-height: calc(100vh - 300px);
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 12px;
    line-height: 1.7;
    padding: 40px;
    overflow-y: auto;
}

#minutes-editor .ql-editor h1,
#minutes-editor .ql-editor h2 {
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    padding-bottom: 4px;
    margin-top: 16px;
}

#minutes-editor .ql-editor h3 {
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    margin-top: 14px;
}

#minutes-editor .ql-editor ul,
#minutes-editor .ql-editor ol {
    padding-left: 24px;
}

#minutes-editor .ql-editor li {
    margin-bottom: 4px;
}

#minutes-editor .ql-toolbar.ql-snow {
    border-color: #e5e7eb;
    border-radius: 0.75rem 0.75rem 0 0;
    background: #f9fafb;
}

#minutes-editor .ql-container.ql-snow {
    border-color: #e5e7eb;
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Print styles */
@media print {
    nav, aside, .no-print { display: none !important; }
    main { padding: 0 !important; }
    /* Public minutes print */
    #public-minutes-viewer > div:first-child { display: none !important; }
    #public-minutes-viewer > div:last-child > div:last-child { display: none !important; }
    #public-minutes-viewer { background: white !important; }
    #public-minutes-body { border: none !important; box-shadow: none !important; padding: 0 !important; }
}

/* --- COLLAPSIBLE SECTIONS --- */
.section-collapse-btn {
    cursor: pointer;
    border: none;
    background: none;
    line-height: 1;
}
.section-collapse-btn i {
    display: inline-block;
    transition: transform 0.25s ease;
}
.section-collapse-btn.collapsed i {
    transform: rotate(-90deg);
}

/* --- QUILL RICH TEXT EDITOR (text sections) --- */
.text-section-editor .ql-toolbar {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-color: #e5e7eb;
    background: #f9fafb;
}
.text-section-editor .ql-container {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-color: #e5e7eb;
    min-height: 80px;
    font-size: 14px;
    font-family: inherit;
}
.text-section-editor .ql-editor {
    min-height: 80px;
    max-height: 320px;
    overflow-y: auto;
}
.text-section-editor .ql-editor.ql-blank::before {
    color: #9ca3af;
    font-style: italic;
}

/* Text section preview in agenda HTML */
.text-section-preview {
    padding-left: 8px;
    line-height: 1.6;
}
.text-section-preview p { margin: 2px 0; }
.text-section-preview ul, .text-section-preview ol {
    padding-left: 20px;
    margin: 4px 0;
}
.text-section-preview li { margin: 2px 0; }

/* ======= MAGIC MINUTES ANIMATION ======= */
.magic-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #1e1b4b 0%, #0f0a2e 50%, #030014 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}
.magic-overlay.active { opacity: 1; }
.magic-overlay.fade-out {
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.magic-wand {
    font-size: 5rem;
    color: #a78bfa;
    animation: wandFloat 2s ease-in-out infinite, wandGlow 1.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.6));
}
@keyframes wandFloat {
    0%, 100% { transform: translateY(0) rotate(-10deg); }
    50% { transform: translateY(-12px) rotate(5deg); }
}
@keyframes wandGlow {
    0% { filter: drop-shadow(0 0 15px rgba(167, 139, 250, 0.4)); }
    100% { filter: drop-shadow(0 0 40px rgba(167, 139, 250, 0.9)) drop-shadow(0 0 80px rgba(139, 92, 246, 0.4)); }
}

.magic-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.magic-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: sparkleFloat var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0;
    left: var(--x);
    top: var(--y);
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.6), 0 0 12px 4px rgba(167, 139, 250, 0.3);
}
.magic-sparkle.gold {
    background: #fbbf24;
    box-shadow: 0 0 6px 2px rgba(251, 191, 36, 0.6), 0 0 12px 4px rgba(251, 191, 36, 0.3);
}
@keyframes sparkleFloat {
    0% { opacity: 0; transform: scale(0) translateY(0); }
    15% { opacity: 1; transform: scale(1.2); }
    50% { opacity: 0.8; transform: scale(0.8) translateY(-20px); }
    85% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0) translateY(-40px); }
}

.magic-message {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2rem;
    min-height: 2rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.magic-message.visible {
    opacity: 1;
    transform: translateY(0);
}
.magic-message.hidden-msg {
    opacity: 0;
    transform: translateY(10px);
}

.magic-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin-top: 1.5rem;
    overflow: hidden;
}
.magic-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #818cf8, #c084fc);
    border-radius: 2px;
    width: 0%;
    transition: width 0.8s ease;
}

.magic-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid rgba(167, 139, 250, 0.5);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.magic-ring.expand {
    animation: ringExpand 1s ease-out forwards;
}
@keyframes ringExpand {
    0% { opacity: 0.8; transform: scale(0.5); }
    100% { opacity: 0; transform: scale(4); border-width: 1px; }
}
