/* Digimo RSVP Form Styles - Responsive & Mobile-Friendly */

.digimo-rsvp-form-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    transition: box-shadow 0.3s ease;
}

.digimo-rsvp-form-container:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

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

.digimo-rsvp-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    letter-spacing: 0.025em;
}

.digimo-rsvp-form select,
.digimo-rsvp-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.digimo-rsvp-form select:focus,
.digimo-rsvp-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #fafbfc;
}

.digimo-rsvp-form select:hover,
.digimo-rsvp-form textarea:hover {
    border-color: #9ca3af;
}

.digimo-rsvp-form textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.digimo-rsvp-form button {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.digimo-rsvp-form button:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.digimo-rsvp-form button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}

.digimo-rsvp-form button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.digimo-rsvp-form button:disabled:hover {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Jumlah Tamu Options - Visual Radio Buttons */
.jumlah-tamu-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.pax-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pax-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pax-label {
    display: inline-block;
    padding: 12px 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    min-width: 80px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.pax-option:hover .pax-label {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pax-radio:checked + .pax-label {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pax-radio:checked + .pax-label::before {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #10b981;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive design untuk pax options */
@media (max-width: 480px) {
    .jumlah-tamu-options {
        gap: 8px;
    }
    
    .pax-label {
        padding: 10px 16px;
        min-width: 70px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .jumlah-tamu-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .pax-label {
        min-width: 100%;
        text-align: center;
    }
}

.rsvp-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: slideIn 0.3s ease;
}

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

.rsvp-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: block;
}

.rsvp-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* Smooth transitions for form group visibility */
#jumlah_tamu_group {
    transition: all 0.3s ease;
    overflow: hidden;
}

#jumlah_tamu_group.hidden {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
}

#jumlah_tamu_group.visible {
    max-height: 100px;
    margin-bottom: 20px;
    opacity: 1;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .digimo-rsvp-form-container {
        margin: 16px;
        padding: 20px;
        border-radius: 8px;
    }
    
    .digimo-rsvp-form select,
    .digimo-rsvp-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px;
    }
    
    .digimo-rsvp-form button {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .digimo-rsvp-form label {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .digimo-rsvp-form-container {
        margin: 12px;
        padding: 16px;
    }
    
    .digimo-rsvp-form .form-group {
        margin-bottom: 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .digimo-rsvp-form-container {
        border: 2px solid #000000;
    }
    
    .digimo-rsvp-form select,
    .digimo-rsvp-form textarea {
        border: 2px solid #000000;
    }
    
    .digimo-rsvp-form button {
        background: #000000;
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .digimo-rsvp-form-container,
    .digimo-rsvp-form select,
    .digimo-rsvp-form textarea,
    .digimo-rsvp-form button,
    .rsvp-message,
    #jumlah_tamu_group {
        transition: none;
        animation: none;
    }
    
    .digimo-rsvp-form button:hover:not(:disabled) {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .digimo-rsvp-form-container {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .digimo-rsvp-form label {
        color: #f3f4f6;
    }
    
    .digimo-rsvp-form select,
    .digimo-rsvp-form textarea {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .digimo-rsvp-form select:focus,
    .digimo-rsvp-form textarea:focus {
        background-color: #4b5563;
        border-color: #60a5fa;
    }
    
    .rsvp-message.success {
        background-color: #064e3b;
        color: #a7f3d0;
        border-color: #047857;
    }
    
    .rsvp-message.error {
        background-color: #7f1d1d;
        color: #fca5a5;
        border-color: #dc2626;
    }
}

/* Print styles */
@media print {
    .digimo-rsvp-form-container {
        box-shadow: none;
        border: 1px solid #000000;
    }
    
    .digimo-rsvp-form button {
        display: none;
    }
}



/* Elementor Widget Specific Styles */
.digimo-rsvp-elementor-widget {
    width: 100%;
}

.digimo-rsvp-elementor-widget .digimo-rsvp-form-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* Elementor Editor Preview Styles */
.elementor-editor .digimo-rsvp-form-container {
    pointer-events: none;
}

.elementor-editor .digimo-rsvp-form button {
    cursor: default;
}

/* Elementor Widget Container Adjustments */
.elementor-widget-digimo-rsvp-form {
    width: 100%;
}

.elementor-widget-digimo-rsvp-form .digimo-rsvp-form-container {
    margin: 0 auto;
}

/* Override Elementor default styles that might conflict */
.elementor-widget-digimo-rsvp-form .digimo-rsvp-form select,
.elementor-widget-digimo-rsvp-form .digimo-rsvp-form textarea,
.elementor-widget-digimo-rsvp-form .digimo-rsvp-form button {
    font-family: inherit;
    line-height: inherit;
}

/* Ensure proper spacing in Elementor */
.elementor-widget-digimo-rsvp-form .form-group {
    margin-bottom: 20px;
}

.elementor-widget-digimo-rsvp-form .form-group:last-of-type {
    margin-bottom: 20px;
}

/* Responsive adjustments for Elementor */
@media (max-width: 768px) {
    .elementor-widget-digimo-rsvp-form .digimo-rsvp-form-container {
        margin: 0;
    }
    
    .digimo-rsvp-elementor-widget .digimo-rsvp-form-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .digimo-rsvp-elementor-widget .digimo-rsvp-form-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
}

/* Elementor Preview Mode Styles */
.elementor-editor-active .digimo-rsvp-form-container::after {
    content: "Preview Mode - Form functionality disabled in editor";
    display: block;
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    font-style: italic;
}

