/* ==== PERSISTENT ROOMS STYLING ==== */

/* Save Room Modal */
.save-room-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    animation: slideIn 0.3s ease;
}

.dark-mode .save-room-dialog {
    background: #2d2d2d;
    color: #e0e0e0;
}

.save-room-dialog .dialog-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.dark-mode .save-room-dialog .dialog-header {
    border-bottom-color: #444;
}

.save-room-dialog .dialog-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #333;
}

.dark-mode .save-room-dialog .dialog-header h3 {
    color: #e0e0e0;
}

.save-room-dialog .dialog-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.dark-mode .save-room-dialog .dialog-header p {
    color: #aaa;
}

.save-room-dialog .dialog-content {
    padding: 24px;
}

.save-room-info {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.dark-mode .save-room-info {
    background: #1a1a1a;
    border-left-color: #667eea;
}

.save-room-info .info-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.save-room-info .info-text h4 {
    margin: 0 0 8px 0;
    color: #333;
}

.dark-mode .save-room-info .info-text h4 {
    color: #e0e0e0;
}

.save-room-info .info-text p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 14px;
}

.dark-mode .save-room-info .info-text p {
    color: #aaa;
}

.save-room-info ul {
    margin: 0;
    padding-left: 20px;
}

.save-room-info li {
    margin-bottom: 6px;
    color: #555;
    font-size: 14px;
}

.dark-mode .save-room-info li {
    color: #bbb;
}

.email-input-group {
    margin-bottom: 20px;
}

.email-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.dark-mode .email-input-group label {
    color: #e0e0e0;
}

.email-input-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.email-input-group input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
}

.dark-mode .email-input-group input[type="email"] {
    background: #1a1a1a;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .email-input-group input[type="email"]:focus {
    border-color: #667eea;
}

.email-input-group small {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 13px;
}

.dark-mode .email-input-group small {
    color: #999;
}

.save-room-dialog .dialog-actions {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.dark-mode .save-room-dialog .dialog-actions {
    border-top-color: #444;
}

.save-room-dialog .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.save-room-dialog .btn-primary {
    background: #667eea;
    color: white;
}

.save-room-dialog .btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.save-room-dialog .btn-secondary {
    background: #6c757d;
    color: white;
}

.save-room-dialog .btn-secondary:hover {
    background: #5a6268;
}

/* Manage Rooms Screen */
.manage-rooms-screen {
    display: none;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

.manage-rooms-header {
    text-align: center;
    margin-bottom: 40px;
}

.manage-rooms-header h2 {
    font-size: 32px;
    margin-bottom: 12px;
    color: #333;
}

.dark-mode .manage-rooms-header h2 {
    color: #e0e0e0;
}

.manage-rooms-header p {
    color: #666;
    font-size: 16px;
}

.dark-mode .manage-rooms-header p {
    color: #aaa;
}

.email-lookup-section {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
}

.email-lookup-section .input-group {
    margin-bottom: 16px;
}

.email-lookup-section input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 18px;
    text-align: center;
    transition: border-color 0.3s;
}

.email-lookup-section input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
}

.dark-mode .email-lookup-section input[type="email"] {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

.user-rooms-list {
    display: none;
    margin-top: 40px;
}

.rooms-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

.dark-mode .rooms-list-header {
    border-bottom-color: #444;
}

.rooms-list-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.dark-mode .rooms-list-header h3 {
    color: #e0e0e0;
}

.rooms-list-header .btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Room Card */
.room-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.dark-mode .room-card {
    background: #2d2d2d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .room-card:hover {
    border-color: #667eea;
}

.room-card.room-expired {
    opacity: 0.6;
    border-color: #dc3545;
}

.room-card.room-expired:hover {
    border-color: #dc3545;
}

.room-card-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.dark-mode .room-card-header {
    border-bottom-color: #444;
}

.room-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.room-info {
    flex: 1;
}

.room-info h4 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #333;
}

.dark-mode .room-info h4 {
    color: #e0e0e0;
}

.room-code {
    font-size: 14px;
    color: #666;
}

.dark-mode .room-code {
    color: #aaa;
}

.room-code strong {
    color: #667eea;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.room-card-body {
    margin-bottom: 16px;
}

.room-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.meta-label {
    color: #888;
}

.dark-mode .meta-label {
    color: #999;
}

.meta-value {
    color: #333;
    font-weight: 600;
}

.dark-mode .meta-value {
    color: #e0e0e0;
}

.room-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.room-status-badge.expired {
    background: #ffeef0;
    color: #dc3545;
}

.dark-mode .room-status-badge.expired {
    background: #4a1a1f;
    color: #ff6b7a;
}

.room-card-actions {
    display: flex;
    gap: 8px;
}

.room-card-actions .btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.room-card-actions .btn-primary {
    background: #667eea;
    color: white;
}

.room-card-actions .btn-primary:hover {
    background: #5568d3;
}

.room-card-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.room-card-actions .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.room-card-actions .btn-danger {
    background: #dc3545;
    color: white;
}

.room-card-actions .btn-danger:hover {
    background: #c82333;
}

.no-rooms-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.dark-mode .no-rooms-message {
    color: #aaa;
}

.no-rooms-message p {
    font-size: 20px;
    margin-bottom: 24px;
}

/* Button Styles for Homepage */
.btn.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .save-room-dialog {
        width: 95%;
        max-height: 95vh;
    }

    .save-room-info {
        flex-direction: column;
    }

    .save-room-info .info-icon {
        text-align: center;
    }

    .save-room-dialog .dialog-actions {
        flex-direction: column;
    }

    .save-room-dialog .btn {
        width: 100%;
    }

    .rooms-grid {
        grid-template-columns: 1fr;
    }

    .rooms-list-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .rooms-list-header .btn-small {
        width: 100%;
    }

    .room-card-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .manage-rooms-header h2 {
        font-size: 24px;
    }

    .email-lookup-section input[type="email"] {
        font-size: 16px;
    }

    .room-card {
        padding: 16px;
    }
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Success/Error States */
.form-status {
    margin-top: 16px;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
}

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

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

.dark-mode .form-status.success {
    background: #1a3d25;
    color: #4ade80;
    border-color: #2d5a38;
}

.dark-mode .form-status.error {
    background: #3d1a1f;
    color: #ff6b7a;
    border-color: #5a2d33;
}
