/**
 * Voxel Toolkit - RSVP Styles
 */

/* ===========================
   RSVP Form Widget
   =========================== */

.vt-rsvp-form-wrapper {
    max-width: 100%;
}

.vt-rsvp-description {
    margin-bottom: 16px;
    line-height: 1.5;
}

.vt-rsvp-count {
    margin-bottom: 16px;
    font-weight: 500;
}

.vt-rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vt-rsvp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vt-rsvp-label {
    font-weight: 500;
    font-size: 14px;
}

.vt-rsvp-label .required {
    color: #ef4444;
}

.vt-rsvp-input,
.vt-rsvp-textarea,
.vt-rsvp-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

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

.vt-rsvp-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    padding-right: 36px;
    cursor: pointer;
}

.vt-rsvp-textarea {
    min-height: 100px;
    resize: vertical;
}

.vt-rsvp-char-count {
    font-size: 12px;
    color: #6b7280;
    text-align: right;
}

.vt-rsvp-submit-btn,
.vt-rsvp-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vt-rsvp-submit-btn {
    background-color: #3b82f6;
    color: #ffffff;
}

.vt-rsvp-submit-btn:hover {
    background-color: #2563eb;
}

.vt-rsvp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vt-rsvp-cancel-btn {
    background-color: #f3f4f6;
    color: #374151;
}

.vt-rsvp-cancel-btn:hover {
    background-color: #e5e7eb;
}

/* Status Messages */
.vt-rsvp-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.vt-rsvp-message.vt-rsvp-success {
    background-color: #ecfdf5;
    color: #065f46;
}

.vt-rsvp-message.vt-rsvp-error {
    background-color: #fef2f2;
    color: #991b1b;
}

.vt-rsvp-message.vt-rsvp-pending {
    background-color: #fffbeb;
    color: #92400e;
}

.vt-rsvp-status {
    margin-bottom: 16px;
}

.vt-rsvp-closed {
    text-align: center;
}

.vt-rsvp-message-container {
    min-height: 0;
}

.vt-rsvp-message-container:not(:empty) {
    margin-bottom: 16px;
}

/* Loading State */
.vt-rsvp-form-wrapper.vt-loading .vt-rsvp-submit-btn,
.vt-rsvp-form-wrapper.vt-loading .vt-rsvp-cancel-btn {
    opacity: 0.6;
    pointer-events: none;
}

/* ===========================
   Attendee List Widget
   =========================== */

.vt-attendee-list-wrapper {
    max-width: 100%;
}

.vt-attendee-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.vt-attendee-list-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.vt-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vt-export-btn:hover {
    background-color: #e5e7eb;
    color: #111827;
}

/* Attendee List */
.vt-attendee-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vt-attendee-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.vt-attendee-item:hover {
    background-color: #f3f4f6;
}

.vt-attendee-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.vt-attendee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.vt-attendee-info {
    flex: 1;
    min-width: 0;
}

.vt-attendee-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vt-attendee-name {
    font-weight: 500;
    font-size: 14px;
    color: #111827;
}

.vt-attendee-comment {
    margin-top: 6px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    word-break: break-word;
}

.vt-attendee-timestamp {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

/* Status Badges */
.vt-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.vt-status-badge.vt-status-approved {
    background-color: #10b981;
    color: #ffffff;
}

.vt-status-badge.vt-status-pending {
    background-color: #f59e0b;
    color: #ffffff;
}

.vt-status-badge.vt-status-rejected {
    background-color: #ef4444;
    color: #ffffff;
}

/* Admin Actions */
.vt-admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.vt-admin-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vt-approve-btn {
    background-color: #10b981;
    color: #ffffff;
}

.vt-approve-btn:hover {
    background-color: #059669;
}

.vt-reject-btn {
    background-color: #ef4444;
    color: #ffffff;
}

.vt-reject-btn:hover {
    background-color: #dc2626;
}

.vt-delete-btn {
    background-color: #f3f4f6;
    color: #6b7280;
}

.vt-delete-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.vt-admin-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty State */
.vt-attendee-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.vt-attendee-empty p {
    margin: 0;
}

/* Load More */
.vt-load-more-wrapper {
    margin-top: 20px;
    text-align: center;
}

.vt-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vt-load-more-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.vt-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading States */
.vt-attendee-list-wrapper.vt-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Fade out animation for removed items */
.vt-attendee-item.vt-removing {
    animation: vtFadeOut 0.3s ease forwards;
}

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

/* Fade in animation for new items */
.vt-attendee-item.vt-new {
    animation: vtFadeIn 0.3s ease forwards;
}

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

/* ===========================
   Responsive Adjustments
   =========================== */

@media (max-width: 640px) {
    .vt-attendee-list-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .vt-attendee-name-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
