/* Hospital Modal Styles */
#modal-hospital .modal-content {
    width: 950px;
    max-width: 95vw;
    height: 85vh;
    background: #1a1a1a;
    border: 4px solid #4a4a4a;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex !important;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.hospital-header {
    height: 80px;
    background: #2c3e50;
    color: #fff;
    padding: 0 20px;
    border-bottom: 2px solid #34495e;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.hospital-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: #e74c3c;
    /* Red cross color */
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

.hospital-scene {
    position: relative;
    flex: 1;
    background-color: #000;
    overflow: hidden;
}

/* Background Image */
.hospital-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
    /* Dim the background slightly */
}

/* Content Overlay */
.hospital-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
    /* Subtle dark overlay */
    overflow-y: auto;
}

/* Hero Grid */
.hospital-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    width: 100%;
}

/* Mini Hero Card */
.hospital-hero-card {
    background: rgba(30, 30, 30, 0.9);
    border: 2px solid #555;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.hospital-hero-card:hover {
    transform: translateY(-2px);
    border-color: #bdc3c7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.hospital-hero-card.selected {
    border-color: #2ecc71;
    /* Green for healing */
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
    background: rgba(46, 204, 113, 0.1);
}

.hospital-hero-portrait {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    /* Square with slight rounded corners */
    border: 2px solid #333;
    margin-bottom: 8px;
    object-fit: cover;
    object-position: center 4%;
    background: #000;
}

.hospital-hero-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ecf0f1;
    text-align: center;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Bars in Mini Card */
.hospital-hero-bars {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mini-bar {
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.mini-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.mini-bar-fill.hp {
    background: #e74c3c;
}

.mini-bar-fill.mp {
    background: #3498db;
}

/* Status Checkbox/Indicator */
.selection-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    border: 2px solid #555;
    background: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
}

.hospital-hero-card.selected .selection-indicator {
    background: #2ecc71;
    border-color: #27ae60;
    color: #fff;
    content: '✔';
}

/* Footer Controls */
.hospital-footer {
    background: #2c3e50;
    padding: 15px;
    border-top: 2px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.hospital-actions {
    display: flex;
    gap: 15px;
}

.btn-heal {
    background: #27ae60;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    box-shadow: 0 4px 0 #219150;
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-heal:hover:not(:disabled) {
    background: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #219150;
}

.btn-heal:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 0 0 #219150;
}

.btn-heal:disabled {
    background: #95a5a6;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-heal-all {
    background: #27ae60;
    /* Green */
    box-shadow: 0 4px 0 #219150;
}

.btn-heal-all:hover:not(:disabled) {
    background: #2ecc71;
    box-shadow: 0 6px 0 #219150;
}

.btn-damage-all {
    background: #c0392b;
    box-shadow: 0 4px 0 #96281b;
}

.btn-damage-all:hover:not(:disabled) {
    background: #e74c3c;
    box-shadow: 0 6px 0 #96281b;
}

.cost-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 5px;
}

/* Wallet - Styled like Tavern */
.hospital-wallet {
    font-family: 'Press Start 2P', cursive;
    color: #ffd700;
    /* Tavern Gold */
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border: 2px solid #5d4037;
    /* Tavern Wood Light */
    border-radius: 4px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
    text-shadow: 1px 1px 0 #000;
}

.hospital-wallet .coin-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

/* Empty State */
.hospital-empty {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    /* Dark overlay covering the scene */
    backdrop-filter: blur(4px);
    z-index: 20;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.hospital-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
    animation: pulse 2s infinite ease-in-out;
}

.hospital-empty .empty-message {
    font-family: 'Press Start 2P', cursive;
    color: #2ecc71;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.6);
    text-align: center;
    line-height: 1.5;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}



/* Hero Info Overlay */
.hospital-portrait-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
}

.hospital-hero-level {
    position: absolute;
    bottom: -2px;
    right: -5px;
    background: #2c3e50;
    color: #ffd700;
    border: 1px solid #ffd700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hospital-hero-info {
    text-align: center;
    width: 100%;
    margin-bottom: 5px;
}

.hospital-hero-class {
    font-size: 0.7rem;
    color: #bdc3c7;
    margin-top: 2px;
    font-style: italic;
}
