/* Стили для модального окна бронирования */

.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.8) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

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

.booking-modal.show {
    display: flex;
}

.booking-modal .modal-dialog {
    max-width: 550px;
    width: 90%;
    margin: 0;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.booking-modal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    overflow: hidden;
}

.booking-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.5rem;
    position: relative;
}

.booking-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.booking-modal .modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.booking-modal .modal-title::before {
    content: '🎁';
    font-size: 1.8rem;
}

.booking-modal .modal-header .close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.booking-modal .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.booking-modal .modal-body {
    padding: 2rem;
    background: white;
}

.booking-modal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
    gap: 0.75rem;
    display: flex;
    justify-content: flex-end;
}

/* Стили для содержимого модального окна */
.booking-modal .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.booking-modal .form-check {
    margin-bottom: 1rem;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #f8f9fa;
    position: relative;
}

.booking-modal .form-check:hover {
    border-color: #667eea;
    background: #f0f2ff;
    transform: translateX(4px);
}

.booking-modal .form-check-input {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    width: 20px;
    height: 20px;
}

.booking-modal .form-check-input:checked + .form-check-label {
    color: #667eea;
    font-weight: 600;
}

.booking-modal .form-check-input:checked ~ .form-check {
    border-color: #667eea;
    background: #f0f2ff;
}

.booking-modal .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.booking-modal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Стили для кнопок */
.booking-modal .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.5px;
}

.booking-modal .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.booking-modal .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.booking-modal .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.booking-modal .btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.booking-modal .btn-success:hover::before {
    left: 100%;
}

.booking-modal .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.booking-modal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Стили для кнопки бронирования на странице */
.book-wish-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.book-wish-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.book-wish-btn:hover::before {
    left: 100%;
}

.book-wish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

/* Стили для кнопки отображения полных бронирований */
.booking-btn {
    text-decoration: none;
    border: none;
    background: none;
    color: var(--neutral-600);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.booking-btn:hover {
    color: var(--neutral-800);
    transform: scale(1.05);
}

.booking-btn .booking-count {
    font-weight: 600;
    color: var(--neutral-600);
}

/* Стили для кнопки отображения пользователей, готовых скинуться */
.contributors-btn {
    text-decoration: none;
    border: none;
    background: none;
    color: var(--primary);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.contributors-btn:hover {
    color: var(--primary-dark);
    transform: scale(1.05);
}

.contributors-btn .contributors-count {
    font-weight: 600;
    color: var(--primary);
}

/* Стили для модального окна полных бронирований */
#bookingsModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#bookingsModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

#bookingsModal .modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#bookingsModal .modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Стили для сетки полных бронирований */
.bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.booking-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    background: var(--neutral-50);
    transition: all 0.2s ease;
}

.booking-item:hover {
    border-color: var(--primary-300);
    background: var(--neutral-100);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.booking-avatar-container {
    flex-shrink: 0;
}

.booking-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-300);
}

.booking-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    border: 2px solid var(--primary-300);
}

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

.booking-name {
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: 0.25rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.booking-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.booking-profile-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.booking-comment {
    font-style: italic;
    color: var(--neutral-600);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.booking-date {
    font-size: 0.75rem;
}

/* Стили для модального окна пользователей */
#contributorsModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#contributorsModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

#contributorsModal .modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#contributorsModal .modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Стили для сетки пользователей */
.contributors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.contributor-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    background: var(--neutral-50);
    transition: all 0.2s ease;
}

.contributor-item:hover {
    border-color: var(--primary-300);
    background: var(--neutral-100);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contributor-avatar-container {
    flex-shrink: 0;
}

.contributor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-300);
}

.contributor-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    border: 2px solid var(--primary-300);
}

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

.contributor-name {
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contributor-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.contributor-profile-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contributor-comment {
    font-style: italic;
    color: var(--neutral-600);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.contributor-date {
    font-size: 0.75rem;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .contributors-grid {
        grid-template-columns: 1fr;
    }
    
    .contributor-item {
        padding: 0.75rem;
    }
    
    .contributor-avatar,
    .contributor-avatar-placeholder {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    #contributorsModal .modal-body {
        padding: 1rem;
        max-height: 70vh;
    }
}

.book-wish-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.book-wish-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Анимации для модального окна */
.booking-modal.show .modal-dialog {
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modalSlideIn {
    0% {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Эффект пульсации для кнопки */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.book-wish-btn {
    animation: pulse 2s infinite;
}

.book-wish-btn:hover {
    animation: none;
} 