/**
 * Clean Info Modal Styling
 * Proper CSS hierarchy without !important hacks
 */

/* Modal container improvements */
#info-modal .esim-modal-content {
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
}

#info-modal .esim-modal-body {
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    padding: 24px;
}

/* Clean info title styling with proper specificity */
#info-modal .esim-info-details .info-title,
#info-modal h4.info-title {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    padding: 14px 20px;
    margin: 0 -24px 20px -24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.15);
    border: 1px solid #e2e8f0;
}

/* Enhanced content structure */
#info-modal .esim-info-details {
    line-height: 1.6;
}

#info-modal .info-items {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#info-modal .info-item {
    display: table-row;
    border-bottom: 1px solid #f1f5f9;
}

#info-modal .info-item:last-child {
    border-bottom: none;
}

#info-modal .info-label,
#info-modal .info-value {
    display: table-cell;
    padding: 12px 0;
    vertical-align: top;
}

#info-modal .info-label {
    font-weight: 600;
    color: #475569;
    width: 40%;
    padding-right: 16px;
}

#info-modal .info-value {
    color: #1e293b;
    word-wrap: break-word;
}

/* Status indicators */
#info-modal .info-value.positive {
    color: #059669;
    font-weight: 600;
}

#info-modal .info-value.negative {
    color: #dc2626;
    font-weight: 600;
}

#info-modal .info-value.neutral {
    color: #6b7280;
}

/* Scroll indicator */
#info-modal .esim-modal-body::after {
    content: "↓ Scroll for more details";
    position: sticky;
    bottom: 0;
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.95));
    color: #64748b;
    font-size: 13px;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#info-modal .esim-modal-body.has-scroll::after {
    opacity: 1;
}

#info-modal .esim-modal-body.scrolled-bottom::after {
    opacity: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #info-modal .esim-modal-content {
        max-width: 95vw;
        margin: 20px;
    }
    
    #info-modal .esim-modal-body {
        padding: 20px;
    }
    
    #info-modal .info-title {
        font-size: 14px;
        padding: 12px 16px;
        margin: 0 -20px 16px -20px;
    }
    
    #info-modal .info-label,
    #info-modal .info-value {
        padding: 10px 0;
        font-size: 14px;
    }
    
    #info-modal .info-label {
        width: 35%;
        padding-right: 12px;
    }
}

/* Enhanced close button */
#info-modal .esim-modal-close {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

#info-modal .esim-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #374151;
    transform: scale(1.1);
}