/* Responsive styles for all screen sizes */

/* Make the map container responsive */
#map-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Prevent map overflow */
}

#campus-map {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure the map scales while maintaining aspect ratio */
}

.pin {
    position: absolute;
    width: 4%; /* Adjusted size for visibility on smaller screens */
    max-width: 40px; /* Limit maximum size for large screens */
    height: auto;
    cursor: pointer;
    animation: pulse 1.5s infinite;
}

/* Pulse animation for pins */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Ticket Summary Card */
#ticket-summary-card {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 15px;
    width: 180px;
    max-width: 90%;
    text-align: center;
    font-family: Arial, sans-serif;
    color: #333;
    z-index: 999;
}

#ticket-summary-card p {
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
}

#ticket-summary-card h3 {
    margin: 10px 0 0;
    font-size: 1.5rem;
    color: #0078D4;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: slide-in 0.3s ease-out;
}

.close-button {
    cursor: pointer;
    font-size: 1.5em;
    color: #666;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #000;
}

h2 {
    margin-top: 0;
    font-size: 1.3em;
    color: #333;
}

.location-name {
    font-size: 1.1em;
    color: #555;
    margin: 10px 0 20px;
}

#ticket-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #555;
}

#ticket-list li {
    background: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.3s ease;
}

#ticket-list li:hover {
    background: #efefef;
}

/* Add subtle animation for modal appearance */
@keyframes slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    #ticket-summary-card {
        bottom: 1px;
        left: 10px;
        padding: 10px;
        font-size: 0.9rem;
    }

    #ticket-summary-card h3 {
        font-size: 1.2rem;
    }

    .pin {
        width: 5%; /* Larger pin size for better visibility */
    }

    .modal-content {
        padding: 15px;
    }

    h2 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    #ticket-summary-card {
        bottom: 1px;
        left: 5px;
        padding: 8px;
        font-size: 0.8rem;
    }

    #ticket-summary-card h3 {
        font-size: 1rem;
    }

    .pin {
        width: 6%;
    }

    .modal-content {
        width: 95%;
    }
}
