/* Essay Club Monthly Opt-in Form Styles */

/* ============================================
   Container & Layout
   ============================================ */
.optin-container {
    max-width: 720px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Header
   ============================================ */
.optin-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--club-border);
}

.back-link {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--club-text-secondary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: var(--transition-fast);
}

.back-link:hover {
    color: var(--club-accent);
}

/* Header Meta Row (Month Badge + Profile) */
.header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.header-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--club-accent);
    background: var(--club-accent-glow);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(201, 168, 108, 0.3);
}

/* Header Profile Avatar */
.header-profile {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(201, 168, 108, 0.3);
}

.header-avatar-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.15), rgba(201, 168, 108, 0.05));
    border: 2px solid rgba(201, 168, 108, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--club-accent);
}

/* Admin Clickable Styles */
.admin-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-clickable:hover {
    transform: scale(1.05);
}

/* Reset button styles for badge and profile */
button.header-badge,
button.header-profile {
    background: none;
    border: none;
    font: inherit;
    padding: 0;
    margin: 0;
}

button.header-badge {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--club-accent);
    background: var(--club-accent-glow);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(201, 168, 108, 0.3);
}

button.header-badge:hover {
    background: var(--club-accent);
    color: white;
    border-color: var(--club-accent);
}

button.header-profile {
    display: flex;
    align-items: center;
    justify-content: center;
}

button.header-profile:hover .header-avatar-img {
    border-color: var(--club-accent);
    box-shadow: 0 0 0 3px var(--club-accent-glow);
}

button.header-profile:hover .header-avatar-initials {
    background: var(--club-accent);
    color: white;
    border-color: var(--club-accent);
}

.header-member-name {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--club-text-dark);
    margin-left: 0.5rem;
}

.optin-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--club-text-dark);
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--club-text-secondary);
    margin: 0;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

/* ============================================
   Form Sections
   ============================================ */
.optin-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-section {
    background: var(--club-surface);
    border: 1px solid var(--club-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.form-section:hover {
    border-color: var(--club-cream-soft);
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-number {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--club-accent);
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.15), rgba(201, 168, 108, 0.05));
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 108, 0.25);
    flex-shrink: 0;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--club-text-dark);
    margin: 0;
    letter-spacing: -0.01em;
}

.section-optional {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--club-text-secondary);
    margin-left: auto;
}

.section-instructions {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--club-text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.section-instructions em {
    font-style: italic;
    color: var(--club-accent);
}

/* ============================================
   Form Groups & Fields
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

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

/* URL + Date row - URL takes more space */
.form-row:has(.form-group-url) {
    grid-template-columns: 1fr 160px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-row:has(.form-group-url) {
        grid-template-columns: 1fr;
    }
}

.form-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--club-text-dark);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: #c94a4a;
    font-weight: 400;
    margin-left: 2px;
}

.field-instructions {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--club-text-secondary);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

/* ============================================
   Text Inputs & Textareas
   ============================================ */
.form-input,
.form-textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--club-text-dark);
    background: var(--club-bg);
    border: 1px solid var(--club-border);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    transition: var(--transition-smooth);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--club-text-secondary);
    opacity: 0.6;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--club-accent);
    background: var(--club-surface);
    box-shadow: 0 0 0 3px var(--club-accent-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Character count */
.char-count {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.5rem;
    padding: 0.25rem 0;
}

/* ============================================
   Radio Buttons (Stacked)
   ============================================ */
.radio-group.stacked {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--club-bg);
    border: 1px solid var(--club-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.radio-option:hover {
    background: var(--club-surface-hover);
    border-color: var(--club-cream-soft);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--club-border);
    border-radius: 50%;
    background: var(--club-surface);
    transition: var(--transition-smooth);
    position: relative;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--club-accent);
    background: var(--club-accent);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-option input[type="radio"]:checked ~ .radio-text {
    color: var(--club-text-dark);
    font-weight: 500;
}

.radio-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--club-text-secondary);
    transition: var(--transition-smooth);
    flex: 1;
}

/* Status Options with Scores */
.status-options {
    gap: 0.5rem;
}

.status-option {
    justify-content: flex-start;
}

.status-score {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--club-accent);
    background: var(--club-accent-glow);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    margin-left: auto;
    flex-shrink: 0;
    border: 1px solid rgba(201, 168, 108, 0.2);
}

.status-option input[type="radio"]:checked ~ .status-score {
    background: var(--club-accent);
    color: white;
    border-color: var(--club-accent);
}

.status-option-zero .status-score {
    color: var(--club-text-secondary);
    background: var(--club-surface);
    border-color: var(--club-border);
}

.status-option-zero input[type="radio"]:checked ~ .status-score {
    background: var(--club-text-secondary);
    color: white;
    border-color: var(--club-text-secondary);
}

/* ============================================
   Checkboxes
   ============================================ */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--club-bg);
    border: 1px solid var(--club-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.checkbox-option:hover {
    background: var(--club-surface-hover);
    border-color: var(--club-cream-soft);
}

.checkbox-option.highlight-option {
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.08), rgba(201, 168, 108, 0.02));
    border-color: rgba(201, 168, 108, 0.25);
}

.checkbox-option.highlight-option:hover {
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.12), rgba(201, 168, 108, 0.05));
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--club-border);
    border-radius: 4px;
    background: var(--club-surface);
    transition: var(--transition-smooth);
    position: relative;
    flex-shrink: 0;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
    border-color: var(--club-accent);
    background: var(--club-accent);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: white;
    font-weight: bold;
}

.checkbox-option input[type="checkbox"]:checked ~ .checkbox-text {
    color: var(--club-text-dark);
    font-weight: 500;
}

.checkbox-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--club-text-secondary);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

/* Meeting text styles */
.meeting-name {
    font-weight: 500;
    color: var(--club-text-dark);
}

.meeting-datetime {
    font-size: 0.85rem;
    color: var(--club-text-secondary);
}

/* Past meeting styles - still selectable but visually muted */
.checkbox-option.meeting-past {
    opacity: 0.65;
    background: var(--club-bg);
}

.checkbox-option.meeting-past:hover {
    opacity: 0.85;
    background: var(--club-surface-hover);
    border-color: var(--club-cream-soft);
}

.checkbox-option.meeting-past .checkbox-custom {
    background: var(--club-bg);
    border-color: var(--club-border);
}

.checkbox-option.meeting-past .meeting-name {
    color: var(--club-text-secondary);
}

/* When past meeting is checked, make it more visible */
.checkbox-option.meeting-past:has(input:checked) {
    opacity: 0.8;
}

.checkbox-option.meeting-past:has(input:checked) .checkbox-custom {
    border-color: var(--club-accent);
    background: var(--club-accent);
}

.meeting-past-label {
    font-style: italic;
    color: var(--club-text-secondary);
}

.empty-state-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--club-text-secondary);
    font-style: italic;
    padding: 0.5rem 0;
}

/* ============================================
   Topic Grid (Forum Post)
   ============================================ */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

@media (max-width: 600px) {
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.topic-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--club-border);
    border-radius: var(--radius-md);
    background: var(--club-surface);
    color: var(--club-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
}

.topic-btn-icon {
    flex-shrink: 0;
    opacity: 0.5;
}

.topic-btn:hover {
    border-color: var(--club-text-secondary);
    color: var(--club-text-dark);
}

.topic-btn:hover .topic-btn-icon {
    opacity: 0.7;
}

.topic-btn.active .topic-btn-icon {
    opacity: 1;
}

/* Active/selected state with colors */
.topic-btn.active[data-topic="general"] {
    background: rgba(107, 114, 128, 0.12);
    color: #4b5563;
    border-color: #4b5563;
}

.topic-btn.active[data-topic="announcements"] {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border-color: #2563eb;
}

.topic-btn.active[data-topic="recommendations"] {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: #d97706;
}

.topic-btn.active[data-topic="introductions"] {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-color: #059669;
}

.topic-btn.active[data-topic="craft-talk"] {
    background: rgba(201, 168, 108, 0.15);
    color: var(--club-accent-dark);
    border-color: var(--club-accent-dark);
}

.topic-btn.active[data-topic="opportunities"] {
    background: rgba(20, 184, 166, 0.12);
    color: #0d9488;
    border-color: #0d9488;
}

.topic-btn.active[data-topic="resources"] {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    border-color: #4f46e5;
}

.topic-btn.active[data-topic="wins"] {
    background: rgba(251, 191, 36, 0.15);
    color: #b45309;
    border-color: #b45309;
}

.topic-btn.active[data-topic="struggles"] {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border-color: #dc2626;
}

/* ============================================
   Rich Text Editor
   ============================================ */
.editor-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.editor-wrapper {
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.editor-wrapper.focused {
    box-shadow: 0 0 0 3px var(--club-accent-glow);
}

.editor-wrapper.focused .editor-toolbar {
    border-color: var(--club-accent);
}

.editor-wrapper.focused .editor-content {
    border-color: var(--club-accent);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: var(--club-bg);
    border: 1px solid var(--club-border);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    gap: 0.125rem;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--club-border);
    margin: 0 0.375rem;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--club-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.toolbar-btn:hover {
    background: var(--club-surface);
    color: var(--club-text-dark);
}

.toolbar-btn.active {
    background: var(--club-surface);
    color: var(--club-accent);
}

.toolbar-text {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Editor Content Area */
.editor-content {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    padding: 1rem;
    border: 1px solid var(--club-border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--club-bg);
    color: var(--club-text-dark);
}

.editor-content:focus {
    outline: none;
    background: var(--club-surface);
}

.editor-content:empty:before {
    content: attr(placeholder);
    color: var(--club-text-secondary);
    opacity: 0.6;
    pointer-events: none;
}

.editor-content h1,
.editor-content h2,
.editor-content h3 {
    font-family: var(--font-display);
    color: var(--club-text-dark);
    margin: 0.75em 0 0.5em;
}

.editor-content h1 { font-size: 1.5rem; }
.editor-content h2 { font-size: 1.25rem; }

.editor-content p {
    margin: 0 0 0.75em;
}

.editor-content ul,
.editor-content ol {
    padding-left: 1.5em;
    margin: 0 0 0.75em;
}

.editor-content a {
    color: var(--club-accent);
    text-decoration: underline;
}

.editor-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 0;
}

.word-count {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--club-text-secondary);
}

/* ============================================
   Link Modal
   ============================================ */
.link-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.link-modal-overlay.visible {
    display: flex;
}

.link-modal {
    background: var(--club-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.2s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--club-border);
}

.link-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--club-text-dark);
    margin: 0;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--club-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--club-border);
    color: var(--club-text-dark);
}

.link-modal-body {
    padding: 1.25rem;
}

.link-modal-body .form-group {
    margin-bottom: 1rem;
}

.link-modal-body .form-group:last-child {
    margin-bottom: 0;
}

.link-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--club-border);
    background: var(--club-bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ============================================
   Submit Button
   ============================================ */
.form-submit {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--club-accent), #b8954f);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 16px rgba(201, 168, 108, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(201, 168, 108, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Loading State */
.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading .btn-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ============================================
   Success Message
   ============================================ */
.success-message {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.success-message.hidden {
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--club-success), #22c55e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 32px rgba(74, 222, 128, 0.3);
}

.success-message h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--club-text-dark);
    margin: 0 0 0.75rem;
}

.success-message p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--club-text-secondary);
    margin: 0;
}

/* ============================================
   Published Summary (when already published)
   ============================================ */
.published-summary {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

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

.published-date {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: #166534;
}

.published-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: #166534;
    background: #bbf7d0;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
}

.published-summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.published-summary-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.published-summary-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--club-text-secondary);
    margin: 0;
}

.published-summary-link {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: #166534;
    text-decoration: none;
    word-break: break-all;
}

.published-summary-link:hover {
    text-decoration: underline;
}

.published-summary-notes {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--club-text-secondary);
    margin: 0.5rem 0 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid #bbf7d0;
    font-style: italic;
}

.published-summary-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.edit-published-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    border: 1px solid #166534;
    color: #166534;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-published-btn:hover {
    background: #166534;
    color: white;
}

.edit-published-btn svg {
    flex-shrink: 0;
}

/* ============================================
   Edit Published Modal
   ============================================ */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.edit-modal-overlay.visible {
    display: flex;
}

.edit-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.edit-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
}

.edit-modal-header .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.edit-modal-header .modal-close:hover {
    color: #333;
}

.edit-modal form {
    padding: 1.5rem;
}

.edit-modal .form-group {
    margin-bottom: 1.25rem;
}

.edit-modal .form-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.375rem;
}

.edit-modal .form-input,
.edit-modal .form-textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #1a1a1a;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.edit-modal .form-input:focus,
.edit-modal .form-textarea:focus {
    outline: none;
    border-color: #c9a86c;
    box-shadow: 0 0 0 3px rgba(201, 168, 108, 0.15);
}

.edit-modal .form-textarea {
    resize: vertical;
    min-height: 100px;
}

.edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

/* ============================================
   Share Work Section
   ============================================ */
.share-work-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--club-border);
    overflow: hidden;
    max-height: 600px;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease, padding-top 0.3s ease;
}

#share-work-section.hidden {
    display: none;
}

.share-work-section.visible {
    display: block;
    max-height: 600px;
    opacity: 1;
}

.share-work-header {
    margin-bottom: 1.5rem;
}

.share-work-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--club-text);
    margin: 0 0 0.5rem 0;
}

.share-work-header .section-instructions {
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .optin-container {
        padding: 1rem;
    }
    
    .optin-header h1 {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .optin-header h1 {
        font-size: 1.75rem;
    }
    
    .header-subtitle {
        font-size: 1rem;
    }
    
    .form-section {
        padding: 1.25rem;
    }
    
    .submit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-wrap: wrap;
    }
    
    .section-optional {
        width: 100%;
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

/* ============================================
   Admin Selector Modals
   ============================================ */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1rem;
}

.admin-modal-overlay.visible {
    display: flex;
}

.admin-modal {
    background: var(--club-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.2s ease-out;
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--club-border);
    flex-shrink: 0;
}

.admin-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--club-text-dark);
    margin: 0;
}

.admin-modal-body {
    padding: 1rem 1.5rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.admin-search-input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--club-text-dark);
    background: var(--club-bg);
    border: 1px solid var(--club-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    transition: var(--transition-smooth);
}

.admin-search-input:focus {
    outline: none;
    border-color: var(--club-accent);
    box-shadow: 0 0 0 3px var(--club-accent-glow);
}

.admin-selector-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    max-height: 400px;
    overflow-y: auto;
}

.selector-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--club-bg);
    border: 1px solid var(--club-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.selector-option:hover {
    background: var(--club-surface-hover);
    border-color: var(--club-cream-soft);
}

.selector-option.selected {
    background: var(--club-accent-glow);
    border-color: var(--club-accent);
}

.selector-option.selected .selector-option-main {
    color: var(--club-accent-dark);
    font-weight: 600;
}

.selector-option-main {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--club-text-dark);
    flex: 1;
}

.selector-option-sub {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--club-text-secondary);
}

.selector-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.selector-avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.15), rgba(201, 168, 108, 0.05));
    border: 1px solid rgba(201, 168, 108, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--club-accent);
    flex-shrink: 0;
}

.selector-option.hidden {
    display: none;
}
