/* Wedding RSVP Manager - Frontend Styles */

.wrm-rsvp-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wrm-code-entry {
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wrm-code-entry h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.wrm-code-entry p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.wrm-household-rsvp {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wrm-household-rsvp h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.wrm-event-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.wrm-event-overview h3 {
    color: var(--wp--preset--color--accent-2, #e91e63);
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
}

.wrm-event-date,
.wrm-event-location,
.wrm-event-times {
    margin-bottom: 10px;
    color: #555;
}

.wrm-event-times .wrm-times-content {
    margin-top: 5px;
    padding-left: 10px;
}

.wrm-guest-section {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-left: 4px solid #dc3545;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wrm-guest-section h3 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: Georgia, serif;
}

.wrm-child-badge {
    background: #e3f2fd;
    color: #1976d2;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.wrm-guest-response {
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    background: #f8f9fa !important;
    border-left: 4px solid #dc3545 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.wrm-guest-response h4 {
    color: #333 !important;
    margin: 0 0 15px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    font-family: Georgia, serif !important;
}

.wrm-guest-response .wrm-form-group {
    margin-bottom: 15px !important;
}

.wrm-guest-response label {
    display: block !important;
    margin-bottom: 5px !important;
    font-weight: 500 !important;
    color: #333 !important;
}

.wrm-guest-response select,
.wrm-guest-response textarea {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    background: #fff !important;
}

/* TT5 Theme Styling for Form Elements */
.wrm-guest-response select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
}

.wrm-guest-response select:focus {
    border-color: #007cba !important;
    outline: 0 !important;
    box-shadow: 0 0 0 1px #007cba !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007cba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
}

.wrm-guest-response select:hover {
    border-color: #999 !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
}

/* Additional TT5 styling for form elements */
.wrm-guest-response textarea {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
    background-color: #fff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    resize: vertical !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: block !important;
    overflow: hidden !important;
}

.wrm-guest-response textarea:focus {
    border-color: #007cba !important;
    outline: 0 !important;
    box-shadow: 0 0 0 1px #007cba !important;
}

.wrm-guest-response textarea:hover {
    border-color: #999 !important;
}

/* TT5 Styling for RSVP Code Entry Form */
.wrm-code-entry input[type="text"],
.wrm-rsvp-form input[type="text"] {
    width: 300px !important;
    max-width: 100% !important;
    padding: 8px 12px 8px 20px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
    background-color: #fff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
}

.wrm-code-entry input[type="text"]:focus,
.wrm-rsvp-form input[type="text"]:focus {
    border-color: #007cba !important;
    outline: 0 !important;
    box-shadow: 0 0 0 1px #007cba !important;
}

.wrm-code-entry input[type="text"]:hover,
.wrm-rsvp-form input[type="text"]:hover {
    border-color: #999 !important;
}

.wrm-code-entry input[type="text"]::placeholder,
.wrm-rsvp-form input[type="text"]::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

/* TT5 Button Styling */
.wrm-button,
.wrm-submit-button,
.wrm-button-primary,
.wrm-logout-button {
    background-color: var(--wp--preset--color--accent-2, #e91e63) !important;
    color: #fff !important;
    border: 1px solid var(--wp--preset--color--accent-2, #e91e63) !important;
    border-radius: 4px !important;
    padding: 10px 20px !important;
    margin-top: 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    min-width: 120px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.wrm-button:hover,
.wrm-submit-button:hover,
.wrm-button-primary:hover,
.wrm-logout-button:hover {
    background-color: var(--wp--preset--color--accent-2-dark, #c2185b) !important;
    border-color: var(--wp--preset--color--accent-2-dark, #c2185b) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

.wrm-button:focus,
.wrm-submit-button:focus,
.wrm-button-primary:focus,
.wrm-logout-button:focus {
    outline: 0 !important;
    box-shadow: 0 0 0 2px var(--wp--preset--color--accent-2, #e91e63), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.wrm-button:active,
.wrm-submit-button:active,
.wrm-button-primary:active,
.wrm-logout-button:active {
    background-color: var(--wp--preset--color--accent-2-dark, #c2185b) !important;
    border-color: var(--wp--preset--color--accent-2-dark, #c2185b) !important;
    color: #fff !important;
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Force guest response styling to match event schedule */
div.wrm-guest-response {
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    background: #f8f9fa !important;
    border-left: 4px solid #dc3545 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Ensure textarea stays within the guest response container */
.wrm-guest-response .wrm-form-group {
    margin-bottom: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.wrm-guest-response .wrm-form-group textarea {
    width: calc(50% - 12px) !important;
    max-width: calc(50% - 12px) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Response confirmation styles */
.wrm-response-confirmation {
    margin-top: 15px !important;
    padding: 15px !important;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 6px !important;
    border-left: 4px solid #28a745 !important;
}

.wrm-confirmation-message {
    margin: 0 0 10px 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    font-family: Georgia, serif !important;
}

.wrm-edit-button {
    background-color: var(--wp--preset--color--accent-2, #e91e63) !important;
    color: #fff !important;
    border: 1px solid var(--wp--preset--color--accent-2, #e91e63) !important;
    border-radius: 4px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.wrm-edit-button:hover {
    background-color: var(--wp--preset--color--accent-2-dark, #c2185b) !important;
    border-color: var(--wp--preset--color--accent-2-dark, #c2185b) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
}

.wrm-edit-button:focus {
    outline: 0 !important;
    box-shadow: 0 0 0 2px var(--wp--preset--color--accent-2, #e91e63), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.wrm-edit-button:active {
    background-color: var(--wp--preset--color--accent-2-dark, #c2185b) !important;
    border-color: var(--wp--preset--color--accent-2-dark, #c2185b) !important;
    color: #fff !important;
    transform: translateY(0) !important;
}

.wrm-field-group {
    margin-bottom: 15px;
}

.wrm-field-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.wrm-field-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #007cba;
}

/* Timetable Styles */
.wrm-timetable {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    margin: 0;
    padding: 0;
}

.wrm-timetable-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    border-left: 4px solid #e74c3c;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-items: start;
}

.wrm-timetable-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wrm-timetable-time {
    font-weight: 600;
    color: #e74c3c;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-start;
    padding-top: 0.25rem;
    line-height: 1.4;
}

.wrm-timetable-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-left: 0;
    padding-left: 0;
}

.wrm-timetable-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--wp--preset--color--accent-2, #e91e63);
    font-size: 1.3rem;
    line-height: 1.3;
}

.wrm-timetable-content p {
    margin: 0;
    color: #7f8c8d;
    line-height: 1.5;
    text-align: left;
    padding-left: 0;
    margin-left: 0;
}

.wrm-timetable-empty {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
}

/* Mobile responsive for timetable */
@media (max-width: 768px) {
    .wrm-timetable-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: left;
    }
    
    .wrm-timetable-time {
        justify-content: flex-start;
        font-size: 1rem;
        padding-top: 0;
    }
    
    .wrm-timetable-content h3 {
        font-size: 1.1rem;
    }
    
    .wrm-timetable-content p {
        text-align: left;
    }
}

.wrm-field-group select,
.wrm-field-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
}

.wrm-field-group textarea {
    resize: vertical;
    min-height: 60px;
}

.wrm-dinner-preferences {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

.wrm-dinner-preferences .wrm-field-group {
    margin-bottom: 10px;
}

.wrm-dinner-preferences .wrm-field-group:last-child {
    margin-bottom: 0;
}

.wrm-form {
    margin-top: 20px;
}

.wrm-form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.wrm-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wrm-button-primary {
    background: #007cba;
    color: #fff;
}

.wrm-button-primary:hover {
    background: #005a87;
    color: #fff;
}

.wrm-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wrm-message {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    font-weight: 500;
}

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

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

.wrm-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin: 20px 0;
}

/* Loading states */
.wrm-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wrm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007cba;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: wrm-spin 1s linear infinite;
}

@keyframes wrm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style for "Waar & Wanneer" H2 to match other H2 colors */
h2[class*="waar"],
h2[class*="wanneer"] {
    color: var(--wp--preset--color--accent-2, #e91e63) !important;
    font-weight: 600 !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .wrm-rsvp-container {
        padding: 10px;
    }
    
    .wrm-code-entry,
    .wrm-household-rsvp {
        padding: 20px 15px;
    }
    
    .wrm-guest-section {
        padding: 15px;
    }
    
    .wrm-button {
        width: 100%;
        padding: 14px 24px;
    }
}

/* Print styles */
@media print {
    .wrm-form-actions,
    .wrm-button {
        display: none;
    }
    
    .wrm-rsvp-container {
        box-shadow: none;
        border: none;
    }
}
