/* ===== Enhancements for New Features ===== */

/* Activity Detail Modal */
.modal-large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.activity-detail-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.activity-detail-section:last-child {
    border-bottom: none;
}

.activity-detail-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.activity-detail-section h4 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.activity-detail-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 140px;
}

.activity-actions-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}

/* Participants Lists */
.participants-section {
    margin-bottom: 20px;
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.participant-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-weight: 600;
    color: var(--text-primary);
}

.participant-details {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Activity Chat */
.activity-chat {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: fadeInUp 0.3s ease;
}

.chat-message.own {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-message-content {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    background: white;
    color: #1e293b; /* Тёмный текст для светлого фона */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message.own .chat-message-content {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.chat-message-author {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.chat-message.own .chat-message-author {
    color: rgba(255, 255, 255, 0.9);
}

.chat-message-text {
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    color: inherit; /* Наследует от .chat-message-content */
}

.chat-message-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.chat-message.own .chat-message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Dark theme adjustments for chat messages */
[data-theme="dark"] .chat-message-content {
    background: #2d3748; /* Тёмный фон для тёмной темы */
    color: #e2e8f0; /* Светлый текст */
}

[data-theme="dark"] .chat-message.own .chat-message-content {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

[data-theme="dark"] .chat-message-author {
    color: #94a3b8;
}

[data-theme="dark"] .chat-message-time {
    color: #64748b;
}

/* Christmas theme adjustments for chat messages */
[data-theme="christmas"] .chat-message-content {
    background: #f8f9fa;
    color: #1e293b;
    border: 1px solid rgba(196, 30, 58, 0.1);
}

[data-theme="christmas"] .chat-message.own .chat-message-content {
    background: linear-gradient(135deg, #c41e3a, #165b33);
    color: white;
}

.chat-input-container {
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Languages selection */
.languages-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.language-checkbox {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.language-checkbox:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.language-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.language-checkbox input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.language-checkbox span {
    font-size: 14px;
    transition: all 0.3s ease;
}

/* Activity action buttons */
.activity-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.btn-interest {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
}

.btn-interest:hover {
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.btn-confirm {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-edit {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.btn-complete {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.btn-complete:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* Safety reminder modal */
.safety-reminder {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.safety-reminder h3 {
    color: #92400e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.safety-reminder ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.safety-reminder li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #78350f;
}

.safety-reminder li::before {
    content: '⚠️';
    position: absolute;
    left: 0;
}

/* Responsibility notice */
.responsibility-notice {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-left: 4px solid #3b82f6;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.responsibility-notice h3 {
    color: #1e40af;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.responsibility-notice ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.responsibility-notice li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #1e3a8a;
}

.responsibility-notice li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

/* Modal for confirmations */
.confirmation-modal .modal-body {
    padding: 24px;
}

.confirmation-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.confirmation-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Badge for participation status */
.participation-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
}

.badge-interested {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-confirmed {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.badge-host {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #3730a3;
}

/* Notification preferences */
.notification-preference {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.notification-preference h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: var(--text-primary);
}

.notification-preference p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.notification-types {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-types label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Language badges in profile */
.profile-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.language-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

/* Match notification */
.match-notification {
    background: linear-gradient(135deg, #fae8ff, #f3e8ff);
    border: 2px solid #c084fc;
    padding: 16px;
    border-radius: 12px;
    margin: 12px 0;
    animation: matchPulse 2s ease-in-out infinite;
}

@keyframes matchPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(192, 132, 252, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(192, 132, 252, 0);
    }
}

.match-notification h4 {
    color: #7e22ce;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-notification p {
    color: #6b21a8;
    font-size: 14px;
    margin: 0;
}

/* Hour before notification style */
.hour-before-notice {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    color: #78350f;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hour-before-notice::before {
    content: '⏰';
    font-size: 20px;
}

/* Activity status badges */
.activity-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.status-completed {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #3730a3;
}

.status-cancelled {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

/* Edit activity modal */
#editActivityModal .modal-content {
    max-width: 600px;
}

/* Delete confirmation emphasis */
.delete-warning {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    color: #991b1b;
}

.delete-warning strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .languages-select {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .activity-actions {
        flex-direction: column;
    }
    
    .activity-actions .btn {
        width: 100%;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-actions .btn {
        width: 100%;
    }
}

/* Smooth transitions */
.activity-actions .btn,
.language-checkbox,
.notification-preference,
.participation-badge {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
