/* CSS untuk form RSVP dan daftar ucapan */

.saic-button.rvspSelect {
    background-color: #4b0f28 !important;
    color: white !important;
    border: 2px solid #4b0f28 !important;
}

.saic-button:hover {
    background-color: #4b0f2825 !important;
    border-color: #4b0f28 !important;
}

.saic-item-comment {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.saic-item-comment:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.saic-commenter-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #4b0f28 !important;
}

.saic-attendance-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(75, 15, 40, 0.1);
    font-size: 0.85em;
}

.saic-comment-text {
    background: white;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #4b0f28;
    margin-top: 10px;
    line-height: 1.5;
}

.saic-comment-date {
    font-size: 0.75em;
    color: #6c757d;
    font-style: italic;
}

.saic-container-comments {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px 0;
}

.saic-container-comments::-webkit-scrollbar {
    width: 6px;
}

.saic-container-comments::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.saic-container-comments::-webkit-scrollbar-thumb {
    background: #4b0f28;
    border-radius: 3px;
}

.saic-container-comments::-webkit-scrollbar-thumb:hover {
    background: #3a0c20;
}

.saic-wrap-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.saic-input,
.saic-textarea,
.saic-select {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    transition: all 0.3s ease;
}

.saic-input:focus,
.saic-textarea:focus,
.saic-select:focus {
    border-color: #4b0f28;
    outline: none;
    box-shadow: 0 0 0 2px rgba(75, 15, 40, 0.1);
}

.saic-wrap-submit input[type="submit"] {
    background: #4b0f28;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saic-wrap-submit input[type="submit"]:hover {
    background: #3a0c20;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 15, 40, 0.3);
}

.saic-error-info {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    display: none !important;
    /* Force hide all error messages */
}


/* Hide any validation or debug messages */

.saic-error-info,
.error-message,
.debug-message,
.validation-error,
.form-error {
    display: none !important;
}


/* Remove debug indicators */

.debug-mode .saic-wrapper {
    border: none !important;
}

.debug-mode .saic-wrapper::after {
    display: none !important;
}

.rsvp-system-indicator {
    display: none !important;
}

.rsvp-message {
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* Responsive */

@media (max-width: 768px) {
    .rsvp-message {
        position: fixed;
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
    .saic-wrap-form {
        padding: 15px;
    }
    .saic-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .saic-button {
        width: 100%;
        justify-content: center;
    }
}


/* Loading state */

.form-loading {
    opacity: 0.7;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #4b0f28;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Override WordPress RSVP styles and behavior */

.saic-wrapper.undangan-integration-active {
    position: relative;
}

.saic-wrapper.undangan-integration-active::before {
    content: "✨ Sistem RSVP Lokal Aktif";
    position: absolute;
    top: -25px;
    right: 0;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7em;
    z-index: 1000;
}


/* Ensure our form submission takes priority */

.saic-wrapper form.undangan-form-active {
    border: 2px solid #28a745;
    border-radius: 8px;
    background: rgba(40, 167, 69, 0.05);
}


/* Disable WordPress RSVP animations that might interfere */

.saic-wrapper * {
    animation: none !important;
    transition: all 0.3s ease !important;
}


/* Make sure our buttons are clickable */

.saic-button.undangan-button {
    pointer-events: all !important;
    z-index: 999 !important;
    position: relative !important;
}


/* Visual indicator for our custom system */

.rsvp-system-indicator {
    display: none !important;
}


/* Debug mode styles */

.debug-mode .saic-wrapper {
    border: 3px dashed red;
    position: relative;
}

.debug-mode .saic-wrapper::after {
    content: "DEBUG MODE - Check Console";
    position: absolute;
    top: 5px;
    left: 5px;
    background: red;
    color: white;
    padding: 2px 5px;
    font-size: 0.7em;
    z-index: 1001;
}


/* Hide all system validation indicators */

.rsvp-system-indicator,
[class*="rsvp-system"],
[class*="system-indicator"],
div[class*="indicator"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}


/* === GUEST COUNT FORM STYLES === */

.saic-wrap-guest {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: linear-gradient(135deg, rgba(255, 144, 187, 0.1), rgba(75, 15, 40, 0.05));
    border: 2px solid rgba(255, 144, 187, 0.3);
    border-radius: 12px;
    padding: 25px 20px;
    margin: 25px 0;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
    box-shadow: 0 4px 15px rgba(255, 144, 187, 0.1);
}

.saic-wrap-guest:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 144, 187, 0.2);
    border-color: rgba(255, 144, 187, 0.5);
}

.guest-count {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.guest-count i {
    color: #FF90BB;
    font-size: 24px;
    background: rgba(255, 144, 187, 0.1);
    padding: 10px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-guest-count {
    font-size: 18px;
    font-weight: 700;
    color: #4b0f28;
    margin: 0;
    letter-spacing: 0.5px;
}

#guest-count {
    display: inline-block;
    background: linear-gradient(135deg, #FF90BB, #e57ca3);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 800;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 144, 187, 0.3);
    transition: all 0.3s ease;
    animation: guestCountPulse 2s ease-in-out infinite alternate;
}

@keyframes guestCountPulse {
    0% {
        box-shadow: 0 2px 8px rgba(255, 144, 187, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 2px 15px rgba(255, 144, 187, 0.5);
        transform: scale(1.05);
    }
}

.guest-selection-display {
    margin: 15px 0;
    text-align: center;
}

.selected-guest-count {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #FF90BB, #e57ca3);
    color: white;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 144, 187, 0.3);
    transition: all 0.3s ease;
    animation: guestPulse 2s ease-in-out infinite alternate;
}

.selected-guest-count:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 144, 187, 0.4);
}

@keyframes guestPulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 144, 187, 0.3);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 144, 187, 0.6);
    }
}

.saic-select {
    padding: 15px 25px !important;
    border: 2px solid #FF90BB !important;
    border-radius: 8px !important;
    background: white !important;
    color: #4b0f28 !important;
    font-size: 16px !important;
    font-weight: 600;
    cursor: pointer;
    min-width: 180px;
    display: block !important;
    visibility: visible !important;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 144, 187, 0.1);
    margin-top: 10px;
}

.saic-select:hover {
    border-color: #4b0f28 !important;
    box-shadow: 0 4px 15px rgba(255, 144, 187, 0.2);
    transform: translateY(-1px);
}

.saic-select:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 144, 187, 0.3) !important;
    border-color: #4b0f28 !important;
}


/* Animation for guest section */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}


/* Simple notification styles */

.simple-notification {
    animation: fadeInUp 0.3s ease;
}


/* Enhanced comment styles */

.saic-container-comments {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px 0;
    margin-top: 30px;
}

.saic-container-comments::-webkit-scrollbar {
    width: 6px;
}

.saic-container-comments::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.saic-container-comments::-webkit-scrollbar-thumb {
    background: #FF90BB;
    border-radius: 3px;
}

.saic-container-comments::-webkit-scrollbar-thumb:hover {
    background: #e57ca3;
}

.saic-item-comment {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.saic-item-comment:hover {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 144, 187, 0.15);
    transform: translateY(-2px);
}

.saic-item-comment.saic-no-comments {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #ddd;
    text-align: center;
}

.saic-commenter-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #FF90BB !important;
    margin-right: 10px;
}

.saic-attendance-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 15px;
    background: rgba(255, 144, 187, 0.1);
    font-size: 0.85em;
    font-weight: 600;
    margin-left: auto;
    float: right;
}

.saic-comment-text {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #FF90BB;
    margin: 15px 0 10px 0;
    line-height: 1.6;
    color: #333;
    font-size: 0.95em;
}

.saic-comment-date {
    font-size: 0.75em;
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
    text-align: right;
}

.saic-comment-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}


/* Comments section header */

.saic-container-comments::before {
    content: "💌 Ucapan & Konfirmasi Kehadiran";
    display: block;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #4b0f28;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 144, 187, 0.1), rgba(75, 15, 40, 0.05));
    border-radius: 8px;
    border: 2px solid rgba(255, 144, 187, 0.2);
}


/* Enhanced button styles for better interaction */

.saic-buttons {
    display: flex !important;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.saic-button {
    padding: 12px 25px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 25px !important;
    background: white !important;
    color: #666 !important;
    font-size: 16px !important;
    font-weight: 500;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.saic-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    border-color: #4b0f28 !important;
}

.saic-attendance {
    text-align: center;
    margin-bottom: 20px;
}

.saic-text-attendance {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 10px 0 !important;
}

.saic-line-attendance {
    border: none !important;
    height: 2px !important;
    background: linear-gradient(to right, transparent, #4b0f28, transparent) !important;
    margin: 10px 0 !important;
}