/* =============================================
   Wedding Wishes & RSVP - Frontend Styles
   ============================================= */

.wwe-wrapper {
    --wwe-primary: #c8956c;
    --wwe-bg: #fff9f5;
    --wwe-text: #4a3728;
    --wwe-font: 'Playfair Display', Georgia, serif;
    --wwe-radius: 16px;
    --wwe-shadow: 0 4px 24px rgba(200, 149, 108, 0.12);

    font-family: var(--wwe-font);
    color: var(--wwe-text);
    max-width: 680px;
    margin: 0 auto;
}

/* Header */
.wwe-header {
    text-align: center;
    margin-bottom: 32px;
}

.wwe-title {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--wwe-primary);
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}

.wwe-subtitle {
    color: #8a7060;
    font-size: 0.95em;
    margin: 0;
    font-style: italic;
}

/* Form */
.wwe-form-wrap {
    background: var(--wwe-bg);
    border: 1px solid rgba(200, 149, 108, 0.2);
    border-radius: var(--wwe-radius);
    padding: 32px;
    box-shadow: var(--wwe-shadow);
    margin-bottom: 40px;
}

.wwe-form-group {
    margin-bottom: 20px;
}

.wwe-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 8px;
    color: var(--wwe-text);
}

.wwe-form-group label span {
    color: #e74c3c;
}

.wwe-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(200, 149, 108, 0.35);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95em;
    color: var(--wwe-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}

.wwe-input:focus {
    border-color: var(--wwe-primary);
    box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.15);
}

.wwe-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

/* Radio buttons */
.wwe-radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.wwe-radio-label {
    cursor: pointer;
    font-weight: normal !important;
    margin: 0 !important;
}

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

.wwe-radio-btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 500;
    border: 1.5px solid #ddd0c8;
    background: #fff;
    color: #9a8070;
    transition: all 0.2s;
    user-select: none;
    letter-spacing: 0.01em;
}

.wwe-radio-label input[type="radio"]:checked + .wwe-radio-btn.hadir {
    background: #e8f5ee;
    border-color: #2d7a50;
    color: #2d7a50;
    font-weight: 600;
}

.wwe-radio-label input[type="radio"]:checked + .wwe-radio-btn.tidak {
    background: #fdf0f0;
    border-color: #a04040;
    color: #a04040;
    font-weight: 600;
}

/* Alerts */
.wwe-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9em;
}

.wwe-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wwe-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Submit Button */
.wwe-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--wwe-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 16px rgba(200, 149, 108, 0.35);
    margin-top: 4px;
}

.wwe-btn:hover {
    background: #b5804f;
    box-shadow: 0 6px 20px rgba(200, 149, 108, 0.45);
    transform: translateY(-1px);
}

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

.wwe-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Guestbook */
.wwe-guestbook {
    margin-top: 8px;
}

.wwe-guestbook-header {
    margin-bottom: 20px;
}

.wwe-guestbook-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--wwe-primary);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wwe-guestbook-subtitle {
    margin: 0 0 20px;
    font-size: 0.9em;
    color: #8a7060;
    font-style: italic;
}

.wwe-count {
    background: var(--wwe-primary);
    color: #fff;
    font-size: 0.72em;
    border-radius: 50px;
    padding: 2px 10px;
    font-weight: 600;
    font-style: normal;
}

.wwe-wishes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wwe-empty {
    text-align: center;
    color: #a89080;
    font-style: italic;
    padding: 24px;
}

/* Wish Item */
.wwe-wish-item {
    background: #fff;
    border: 1px solid rgba(200, 149, 108, 0.18);
    border-radius: var(--wwe-radius);
    padding: 20px;
    box-shadow: 0 2px 12px rgba(200, 149, 108, 0.08);
    animation: wweSlideIn 0.4s ease;
}

@keyframes wweSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wwe-wish-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wwe-wish-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--wwe-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    font-weight: 700;
    flex-shrink: 0;
}

.wwe-wish-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wwe-wish-meta strong {
    font-size: 0.95em;
    color: var(--wwe-text);
}

.wwe-wish-date {
    font-size: 0.78em;
    color: #a89080;
}

.wwe-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 500;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.wwe-badge.hadir {
    background: #e8f5ee;
    color: #2d7a50;
    border: 1px solid #b6dfc8;
}

.wwe-badge.tidak {
    background: #fdf0f0;
    color: #a04040;
    border: 1px solid #e8b8b8;
}

.wwe-wish-text {
    margin: 0;
    font-size: 0.92em;
    line-height: 1.7;
    color: #5a4535;
    padding-left: 54px;
}

/* Responsive */
@media (max-width: 600px) {
    .wwe-form-wrap {
        padding: 20px;
    }

    .wwe-wish-text {
        padding-left: 0;
        margin-top: 8px;
    }

    .wwe-wish-header {
        flex-wrap: wrap;
    }
}

/* ── Pagination ─────────────────────────────────── */
.wwe-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.wwe-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e0cfc4;
    border-radius: 8px;
    background: #fff;
    color: var(--wwe-primary, #c8956c);
    font-family: inherit;
    font-size: 0.88em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.1s;
    line-height: 1;
}

.wwe-page-btn:hover:not(.active):not(:disabled):not(.disabled) {
    background: #f5ede6;
    color: #b5804f;
}

.wwe-page-btn.active {
    background: var(--wwe-primary, #c8956c);
    border-color: var(--wwe-primary, #c8956c);
    color: #fff;
    font-weight: 700;
    cursor: default;
}

.wwe-page-btn:disabled,
.wwe-page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.wwe-page-btn.wwe-prev,
.wwe-page-btn.wwe-next {
    font-size: 1em;
}

.wwe-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 36px;
    color: #a89080;
    font-size: 0.9em;
    user-select: none;
}

/* Transition on list load */
.wwe-wishes-list {
    transition: opacity 0.2s;
}

/* Highlight new entry */
.wwe-wish-item.wwe-new {
    animation: wweHighlight 1.2s ease;
}

@keyframes wweHighlight {
    0%   { background-color: rgba(200, 149, 108, 0.12); }
    100% { background-color: transparent; }
}
