/* ===================================
   СТИЛИ ДЛЯ ЭКСПЕДИЦИЙ
   expedition.css
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

/* Оверлей модального окна */
.expedition-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.97);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

/* Основной контейнер */
.expedition-container {
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: linear-gradient(180deg, 
        #1e1e24 0%, 
        #252530 30%,
        #1a1a20 60%,
        #15151a 100%
    );
    border-radius: 12px;
    box-shadow: 
        0 0 60px rgba(80, 60, 20, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3020;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Заголовок */
.expedition-header {
    background: linear-gradient(180deg, #251a15 0%, #1a1210 100%);
    padding: 24px 30px;
    border-bottom: 1px solid #3a2a20;
    position: relative;
}

.expedition-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #d4a84a 20%,
        #d4a84a 80%,
        transparent 100%
    );
}

.expedition-title {
    font-family: 'Roboto', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #d4a84a;
    text-align: center;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(212, 168, 74, 0.3);
    margin: 0;
}

/* Кнопка закрытия */
.expedition-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(30, 25, 20, 0.6);
    border: 1px solid #352525;
    border-radius: 50%;
    color: #808080;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.expedition-close-btn:hover {
    background: rgba(50, 40, 30, 0.8);
    color: #b0b0b0;
    transform: rotate(90deg);
}

/* Контент */
.expedition-content {
    padding: 25px 30px;
    overflow-y: auto;
    flex: 1;
}

.expedition-content::-webkit-scrollbar {
    width: 8px;
}

.expedition-content::-webkit-scrollbar-track {
    background: rgba(20, 15, 10, 0.3);
    border-radius: 4px;
}

.expedition-content::-webkit-scrollbar-thumb {
    background: rgba(80, 70, 30, 0.5);
    border-radius: 4px;
}

/* Профиль персонажа В ЭКСПЕДИЦИИ */
.expedition-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(30, 20, 15, 0.5);
    border-radius: 8px;
    border: 1px solid #3a2515;
    margin-bottom: 20px;
}

.expedition-profile .expedition-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #5a3a20;
    object-fit: cover;
}

.expedition-profile .expedition-profile-info {
    flex: 1;
}

.expedition-profile .profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #d4a84a;
    margin-bottom: 4px;
}

.expedition-profile .profile-details {
    font-size: 14px;
    color: #909090;
}

/* Секции */
.expedition-section {
    margin-bottom: 25px;
}

.expedition-section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #d0a080;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3a2515;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.morale-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: #d4a84a;
}

.morale-icon-small {
    width: 20px;
    height: 20px;
}

/* Сетка профессий */
.professions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.profession-card {
    background: rgba(30, 20, 15, 0.5);
    border: 1px solid #3a2515;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
}

.profession-card:hover {
    background: rgba(40, 25, 18, 0.7);
    border-color: #4a3020;
}

.profession-name {
    font-weight: 600;
    color: #d4a84a;
    font-size: 14px;
    margin-bottom: 4px;
}

.profession-level {
    font-size: 12px;
    color: #909090;
    margin-bottom: 6px;
}

.profession-progress {
    margin-bottom: 6px;
}

.profession-progress-bar {
    height: 6px;
    background: rgba(20, 15, 10, 0.7);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.profession-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4a84a, #e0c060);
    transition: width 0.3s ease;
}

.profession-progress-text {
    font-size: 10px;
    color: #808080;
}

.profession-bonus {
    font-size: 12px;
    color: #4CAF50;
    font-weight: 600;
}

/* Бонус от уровня */
.level-bonus-info {
    padding: 12px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    border-radius: 8px;
    color: #4CAF50;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

/* Локации */
.locations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.location-card {
    background: rgba(30, 20, 15, 0.5);
    border: 1px solid #3a2515;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.location-card:hover {
    border-color: #4a3020;
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(40, 25, 18, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.location-header:hover {
    background: rgba(50, 35, 23, 0.7);
}

.location-header:active {
    background: rgba(60, 40, 28, 0.8);
    transform: scale(0.99);
}

.location-name {
    font-size: 18px;
    font-weight: 700;
    color: #d4a84a;
    margin: 0;
}

.location-toggle {
    background: none;
    border: none;
    color: #909090;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: none; /* Отключаем события - клик обрабатывается на header */
    padding: 5px;
}

.location-expeditions {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.location-expeditions.expanded {
    max-height: 1000px;
}

.expedition-type {
    padding: 15px;
    border-top: 1px solid #2a1a10;
    background: rgba(20, 15, 10, 0.3);
}

.expedition-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.expedition-type-name {
    font-weight: 600;
    color: #e0c060;
    font-size: 16px;
}

.expedition-profession {
    font-size: 12px;
    color: #909090;
    padding: 4px 8px;
    background: rgba(80, 60, 30, 0.3);
    border-radius: 4px;
}

.expedition-loot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.loot-item {
    font-size: 12px;
    color: #b0b0b0;
    padding: 4px 8px;
    background: rgba(30, 20, 15, 0.5);
    border-radius: 4px;
}

.expedition-bonus {
    font-size: 12px;
    color: #4CAF50;
    margin-bottom: 10px;
}

/* Обертка для кнопки отправки */
.expedition-button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* Изменено с flex-start на center */
    gap: 6px;
    margin-top: 10px;
    width: 100%; /* Добавлено для центрирования */
}

/* Кнопка отправки в экспедицию */
.start-expedition-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #604030, #4a3020);
    border: 1px solid #705040;
    border-radius: 6px;
    color: #d4a84a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: auto;
    white-space: nowrap;
}

.start-expedition-btn:hover:not(:disabled):not(.disabled) {
    background: linear-gradient(135deg, #705040, #5a4030);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 60, 30, 0.4);
}

.start-expedition-btn:disabled,
.start-expedition-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #403030, #302020);
}

/* Стоимость морали на кнопке */
.morale-cost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    font-size: 13px;
    color: #ff6b6b;
}

.morale-icon-tiny {
    width: 14px;
    height: 14px;
}

/* Сообщение о недостатке морали */
.not-enough-morale {
    font-size: 11px;
    color: #ff6b6b;
    font-style: italic;
}

/* Активная экспедиция */
.expedition-active,
.expedition-completed {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/* Анимированные точки загрузки */
.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation: loadingDots 1.4s infinite;
    opacity: 0;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDots {
    0%, 20% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.expedition-status-card {
    background: linear-gradient(135deg, rgba(30, 20, 15, 0.9), rgba(40, 25, 18, 0.9));
    border: 2px solid #4a3020;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.expedition-status-card h3 {
    font-size: 24px;
    color: #d4a84a;
    margin-bottom: 20px;
}

.expedition-status-card.completed {
    border-color: #4CAF50;
}

.expedition-status-card.completed h3 {
    color: #4CAF50;
}

.expedition-info {
    text-align: left;
    margin-bottom: 20px;
}

.expedition-info p {
    margin: 8px 0;
    color: #b0b0b0;
}

.expedition-timer {
    margin-bottom: 20px;
}

.timer-label {
    font-size: 14px;
    color: #909090;
    margin-bottom: 8px;
}

.timer-display {
    font-size: 36px;
    font-weight: 700;
    color: #d4a84a;
    font-family: 'Roboto', monospace;
}

.expedition-progress-bar {
    height: 20px;
    background: rgba(20, 15, 10, 0.7);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #3a2515;
}

.expedition-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4a84a, #e0c060);
    transition: width 0.5s ease;
    position: relative;
}

.expedition-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.collect-loot-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.collect-loot-btn:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Заблокировано */
.expedition-locked {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.locked-message {
    text-align: center;
    padding: 40px;
    background: rgba(30, 20, 15, 0.5);
    border: 2px solid #5a3a20;
    border-radius: 12px;
}

.locked-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
}

.locked-message p {
    font-size: 18px;
    color: #b0b0b0;
    margin: 10px 0;
}

.locked-details {
    color: #808080;
    font-size: 14px;
}

/* ===================================
   СТИЛИ ДЛЯ УВЕДОМЛЕНИЙ
   =================================== */

/* Базовые стили для уведомлений */
.expedition-notification {
    font-family: 'Roboto', sans-serif;
    text-align: center;
}

/* Анимации для десктопа (справа) */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Анимации для мобильной версии (сверху по центру) */
@keyframes slideInDown {
    from {
        transform: translate(-50%, -100px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -100px);
        opacity: 0;
    }
}

/* ===================================
   АДАПТИВНОСТЬ
   =================================== */

@media (max-width: 768px) {
    .expedition-container {
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .expedition-header {
        padding: 20px;
    }
    
    .expedition-title {
        font-size: 26px;
    }
    
    .expedition-content {
        padding: 20px;
    }
    
    .professions-grid {
        grid-template-columns: 1fr;
    }
    
    .expedition-avatar {
        width: 50px;
        height: 50px;
    }
    
    .profile-name {
        font-size: 18px;
    }
}

@media (max-width: 400px) {
    .expedition-title {
        font-size: 22px;
    }
    
    .timer-display {
        font-size: 28px;
    }
    
    .expedition-status-card {
        padding: 20px;
    }
    
    .expedition-notification {
        font-size: 14px;
        padding: 12px 16px !important;
    }
}
