/* NF Forms - Public — Monochrome B&W */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

.nf-form-wrapper {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    position: relative;
}
.nf-form-wrapper * { box-sizing: border-box; }

/* Header */
.nf-form-header {
    padding: 32px 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid #e0e0e0;
}
.nf-form-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.nf-form-greeting {
    margin: 0;
    font-size: 14px;
    color: #666;
}
.nf-form-greeting strong { color: #000; }
.nf-btn-attendees {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    padding: 8px 14px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all 0.2s;
    white-space: nowrap;
}
.nf-btn-attendees:hover { background: #333; }

/* Form */
.nf-form {
    padding: 28px 32px 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Fields */
.nf-field { margin-bottom: 0; }
.nf-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.nf-required { color: #000; margin-left: 2px; }

.nf-input {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1.5px solid #ccc;
    border-radius: 0;
    font-size: 16px;
    font-family: inherit;
    color: #000;
    background: transparent;
    outline: none;
    transition: border-color 0.2s;
}
.nf-input:focus { border-bottom-color: #000; }
.nf-input::placeholder { color: #aaa; }
.nf-textarea {
    border: 1.5px solid #ccc;
    border-radius: 0;
    padding: 12px;
    resize: vertical;
    min-height: 80px;
}
.nf-textarea:focus { border-color: #000; }
.nf-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 24px;
}
.nf-file { padding: 10px 0; }

/* Radio & Checkbox */
.nf-radio-group, .nf-checkbox-group { display: flex; flex-direction: column; gap: 6px; }
.nf-radio-label, .nf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1.5px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.15s;
}
.nf-radio-label:hover, .nf-checkbox-label:hover { border-color: #000; }
.nf-radio, .nf-checkbox { display: none; }
.nf-radio-custom, .nf-checkbox-custom {
    width: 18px; height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.nf-checkbox-custom { border-radius: 2px; }
.nf-radio:checked ~ .nf-radio-custom, .nf-checkbox:checked ~ .nf-checkbox-custom {
    border-color: #000; background: #000;
}
.nf-radio:checked ~ .nf-radio-custom::after { content: ''; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.nf-checkbox:checked ~ .nf-checkbox-custom::after { content: '✓'; color: #fff; font-size: 11px; font-weight: 700; }
.nf-radio-label:has(.nf-radio:checked), .nf-checkbox-label:has(.nf-checkbox:checked) {
    border-color: #000; background: #f8f8f8;
}

/* RSVP Buttons */
.nf-rsvp-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nf-rsvp-option input { display: none; }
.nf-rsvp-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 16px; border: 2px solid #ddd;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; text-align: center; color: #888;
}
.nf-rsvp-yes .nf-rsvp-btn:hover { border-color: #000; background: #f8f8f8; color: #000; }
.nf-rsvp-no .nf-rsvp-btn:hover { border-color: #000; background: #f8f8f8; color: #000; }
.nf-rsvp-yes input:checked ~ .nf-rsvp-btn {
    border-color: #000; background: #000; color: #fff;
}
.nf-rsvp-no input:checked ~ .nf-rsvp-btn {
    border-color: #666; background: #666; color: #fff;
}

/* Plus One */
.nf-plus-one-wrap { width: 100%; }
.nf-po-choice { margin-bottom: 0; }
.nf-po-choice .nf-rsvp-btn { padding: 12px; font-size: 13px; }
.nf-plus-one-fields { padding: 0; }
.nf-plus-one-entries { display: flex; flex-direction: column; gap: 8px; }
.nf-plus-one-entry { position: relative; }
.nf-plus-one-name { border-bottom: 1.5px solid #ccc !important; }
.nf-add-plus-one {
    background: none; border: none; font-family: inherit;
    font-size: 13px; color: #000; cursor: pointer;
    font-weight: 600; padding: 8px 0; text-decoration: underline;
    text-underline-offset: 3px;
}

/* Headings & misc */
.nf-field-heading { margin: 8px 0 0; font-size: 18px; font-weight: 700; color: #000; letter-spacing: -0.01em; }
.nf-field-desc { margin: 2px 0 0; font-size: 13px; color: #999; }
.nf-field-paragraph { font-size: 14px; color: #666; line-height: 1.6; margin: 0; }
.nf-field-divider { border: none; border-top: 1px solid #e0e0e0; margin: 4px 0; }

/* Signup */
.nf-signup-section { width: 100%; margin-top: 8px; padding-top: 24px; border-top: 1px solid #e0e0e0; }
.nf-signup-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: #000; }
.nf-signup-desc { font-size: 13px; color: #999; margin: 0 0 16px; }
.nf-signup-items { display: flex; flex-direction: column; gap: 6px; }
.nf-signup-category {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
    font-weight: 700; color: #999; margin: 14px 0 4px; padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}
.nf-signup-category:first-child { margin-top: 0; }
.nf-signup-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border: 1.5px solid #ddd; transition: all 0.15s; gap: 12px;
}
.nf-signup-item:hover { border-color: #000; }
.nf-signup-fulfilled { opacity: 0.5; background: #fafafa; }
.nf-signup-item-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nf-signup-item-name { font-size: 14px; font-weight: 500; color: #000; }
.nf-signup-needed { font-size: 12px; color: #999; font-weight: 600; }
.nf-signup-complete { font-size: 12px; color: #000; font-weight: 600; }
.nf-signup-item-action { flex-shrink: 0; }
.nf-signup-qty-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; }
.nf-signup-qty {
    padding: 5px 8px; border: 1.5px solid #ddd; border-radius: 0;
    font-size: 13px; font-family: inherit; background: #fff; cursor: pointer; min-width: 50px;
}

/* Footer */
.nf-form-footer { width: 100%; padding-top: 12px; }
.nf-submit-btn {
    width: 100%; padding: 16px 24px; background: #000; color: #fff;
    border: none; font-size: 14px; font-weight: 700; cursor: pointer;
    font-family: inherit; text-transform: uppercase; letter-spacing: 0.08em;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.nf-submit-btn:hover { background: #222; }
.nf-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Messages */
.nf-form-message {
    width: 100%; padding: 20px; font-size: 15px; font-weight: 500; text-align: center; margin-top: 12px;
}
.nf-form-message.success { background: #f8f8f8; color: #000; border: 1px solid #ddd; }
.nf-form-message.error { background: #fff5f5; color: #c00; border: 1px solid #fcc; }

/* Validation */
.nf-field.has-error .nf-input { border-bottom-color: #c00; }
.nf-field.has-error .nf-textarea { border-color: #c00; }
.nf-field-error { font-size: 12px; color: #c00; margin-top: 4px; font-weight: 500; }

/* ===== Modal ===== */
.nf-attendees-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.nf-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.nf-modal-content {
    position: relative; background: #fff; width: 100%; max-width: 460px; max-height: 80vh;
    overflow: hidden; display: flex; flex-direction: column;
    animation: nf-modal-in 0.2s ease;
}
@keyframes nf-modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.nf-modal-header {
    padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
}
.nf-modal-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: #000; }
.nf-modal-close {
    width: 32px; height: 32px; border: 1px solid #ddd; background: #fff;
    cursor: pointer; font-size: 18px; color: #666;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.nf-modal-close:hover { background: #f5f5f5; }
.nf-modal-body { padding: 20px 24px; overflow-y: auto; }

.nf-attendees-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.nf-att-stat { text-align: center; padding: 12px; border: 1px solid #e0e0e0; }
.nf-att-stat .count { font-size: 22px; font-weight: 700; display: block; }
.nf-att-stat .label { font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.nf-att-stat.yes .count { color: #000; }
.nf-att-stat.no .count { color: #999; }
.nf-att-stat.pending .count { color: #bbb; }

.nf-attendees-list { display: flex; flex-direction: column; }
.nf-attendee-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px;
}
.nf-attendee-item:last-child { border-bottom: none; }
.nf-attendee-icon {
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.nf-attendee-icon.yes { color: #000; }
.nf-attendee-icon.no { color: #ccc; }
.nf-attendee-icon.pending { color: #ddd; }
.nf-attendee-name { flex: 1; font-weight: 500; color: #000; }
.nf-attendee-badge {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
    font-weight: 600; color: #999;
}

.nf-spinner { animation: nf-spin 0.8s linear infinite; }
@keyframes nf-spin { to { transform: rotate(360deg); } }
.nf-loading { text-align: center; padding: 30px; color: #999; font-size: 14px; }
.nf-form-closed { text-align: center; padding: 40px 20px; color: #666; font-size: 15px; }

/* ===== Mobile ===== */
@media (max-width: 640px) {
    .nf-form-wrapper { border-left: none; border-right: none; }
    .nf-form-header { padding: 24px 20px 20px; }
    .nf-form-title { font-size: 20px; }
    .nf-form { padding: 20px; gap: 16px; }
    .nf-field { width: 100% !important; }
    .nf-rsvp-buttons { grid-template-columns: 1fr; }
    .nf-rsvp-btn { padding: 14px; font-size: 13px; }
    .nf-submit-btn { padding: 14px 20px; font-size: 13px; }
    .nf-signup-item { flex-direction: column; align-items: flex-start; }
    .nf-signup-item-action { width: 100%; }
    .nf-signup-qty-label { width: 100%; justify-content: space-between; }
    .nf-modal-content { max-height: 90vh; }
    .nf-attendees-stats { gap: 4px; }
}
