/* assets/frontend-style.css */

/* ========== RSVP Container ========== */
.widu-rsvp-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.widu-rsvp-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ========== RSVP Header ========== */
.widu-rsvp-header {
    background: linear-gradient(135deg, #5F0D23 0%, #5F0D23 100%);
    color: #ffffff;
    padding: 20px 10px;
    text-align: center;
}

.widu-rsvp-title {
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}

.widu-rsvp-guest-name {
    margin: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.widu-rsvp-guest-name strong {
    display: block;
    margin-top: 8px;
    font-size: 22px;
    color: #ffffff;
}

/* ========== RSVP Notices ========== */
.widu-rsvp-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.widu-rsvp-notice .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.widu-rsvp-notice p {
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.widu-rsvp-notice p:last-child {
    margin-bottom: 0;
}

.widu-rsvp-notice-success {
    background: #e4d8db;
    color: #5F0D23;
}

.widu-rsvp-notice-success .dashicons {
    color: #5f0d23;
}

.widu-rsvp-notice-error {
    background: #fef2f2;
    color: #991b1b;
}

.widu-rsvp-notice-error .dashicons {
    color: #ef4444;
}

.widu-rsvp-notice-detail {
    font-size: 14px;
    color: #065f46;
}

.widu-rsvp-update-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d1fae5;
    font-size: 13px;
}

.widu-rsvp-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.widu-rsvp-error p {
    margin: 0;
    color: #991b1b;
}

/* ========== RSVP Form ========== */
.widu-rsvp-form {
    padding: 32px 24px;
}

.widu-form-group {
    margin-bottom: 24px;
}

.widu-form-label {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.widu-form-input,
.widu-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.widu-form-input:focus,
.widu-form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.widu-form-hint {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #6b7280;
}

/* ========== RSVP Options (Radio Buttons) ========== */
.widu-rsvp-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.widu-rsvp-option {
    position: relative;
    cursor: pointer;
}

.widu-rsvp-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.widu-rsvp-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s;
}

.widu-rsvp-option:hover .widu-rsvp-option-content {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.widu-rsvp-option input:checked ~ .widu-rsvp-option-content {
    border-color: #bd657c;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.widu-rsvp-option .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.widu-rsvp-option-text {
    font-size: 14px;
    font-weight: 600;
}

/* Option Colors */
.widu-rsvp-option-confirmed {
    color: #5f0d23;
}

.widu-rsvp-option-declined {
    color: #ef4444;
}

.widu-rsvp-option-maybe {
    color: #f59e0b;
}

/* ========== Submit Button ========== */
.widu-rsvp-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #5f0d23 0%, #8f1233 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.widu-rsvp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.widu-rsvp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.widu-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.widu-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Response Message ========== */
.widu-rsvp-response {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.widu-rsvp-response .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.widu-rsvp-response p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.widu-rsvp-response-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.widu-rsvp-response-success .dashicons {
    color: #22c55e;
}

.widu-rsvp-response-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.widu-rsvp-response-error .dashicons {
    color: #ef4444;
}

/* ========== RSVP Status Display (for shortcode) ========== */
.widu-rsvp-status {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.widu-rsvp-status strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
}

.widu-rsvp-status small {
    display: block;
    font-size: 13px;
    opacity: 0.8;
}

.widu-rsvp-confirmed {
    background: #f0fdf4;
    border: 2px solid #86efac;
    color: #166534;
}

.widu-rsvp-declined {
    background: #fef2f2;
    border: 2px solid #fecaca;
    color: #991b1b;
}

.widu-rsvp-maybe {
    background: #fffbeb;
    border: 2px solid #fde68a;
    color: #92400e;
}

/* ========== Responsive ========== */
@media (max-width: 640px) {
    .widu-rsvp-container {
        margin: 20px auto;
        padding: 0 16px;
    }
    
    .widu-rsvp-header {
        padding: 24px 20px;
    }
    
    .widu-rsvp-title {
        font-size: 24px;
    }
    
    .widu-rsvp-guest-name strong {
        font-size: 18px;
    }
    
    .widu-rsvp-form {
        padding: 24px 20px;
    }
    
    .widu-rsvp-options {
        grid-template-columns: 1fr;
    }
}