/* Custom styles for the Refrigerated Medicines Stability Tool */

/* Search input focus animation */
#search:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease-in-out;
}

/* Medicine card styles */
.medicine-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.medicine-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.medicine-card.expanded {
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

/* Generic name tag */
.generic-tag {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

/* Open/Close button animations */
.open-btn {
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.open-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: scale(1.05);
}

.close-btn {
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.close-btn:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: scale(1.05);
}

/* Expandable content animation */
.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding-top: 0;
    padding-bottom: 0;
}

.expandable-content.expanded {
    max-height: 500px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Temperature range styling */
.temp-range {
    background: linear-gradient(90deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* Status indicators */
.status-yes {
    background-color: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.status-no {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* Loading spinner */
@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-pulse {
    animation: pulse-slow 2s ease-in-out infinite;
}

/* Responsive improvements */
@media (max-width: 640px) {
    .medicine-card {
        margin: 0.5rem;
    }
    
    .generic-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Accessibility improvements */
.medicine-card:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Info section styling */
.info-section {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #0ea5e9;
    border-radius: 0.5rem;
    padding: 1rem;
}

/* Green bubble/pill styling for "Information as per product licence" */
.info-header {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.info-header i {
    margin-right: 0.5rem;
    color: white;
    font-size: 0.875rem;
}

/* Table styling for medicine details */
.medicine-table {
    border-collapse: collapse;
    width: 100%;
}

.medicine-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.medicine-table td:first-child {
    font-weight: 500;
    color: #374151;
    width: 40%;
}

.medicine-table td:last-child {
    color: #111827;
}

.medicine-table tr:last-child td {
    border-bottom: none;
}



/* Instructions styling */
.additional-instructions {
    background: #fef3c7;
    color: #92400e;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border-left: 4px solid #f59e0b;
    font-weight: 500;
}

/* Search results fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Temperature Excursion Modal Styling */
#tempExcursionModal {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

#tempExcursionModal .bg-white {
    animation: slideInUp 0.3s ease-out;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

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

/* Professional Temperature excursion button styling */
#tempExcursionBtn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#tempExcursionBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#tempExcursionBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

#tempExcursionBtn:hover::before {
    left: 100%;
}

#tempExcursionBtn:active {
    transform: translateY(0);
}

/* Professional healthcare-focused styling */
.healthcare-info-btn {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    color: #475569;
    font-weight: 600;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.healthcare-info-btn:hover {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-color: #94a3b8;
    color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Modal content styling */
.modal-content ul li {
    line-height: 1.6;
}

/* Scrollbar styling for modal */
#tempExcursionModal .overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

#tempExcursionModal .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#tempExcursionModal .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#tempExcursionModal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}