.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(64, 64, 64, 0.85);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    min-width: 500px;
    width: auto;
    min-height: 400px;
    max-height: 85vh;
    overflow: hidden;
    transition: transform 0.3s ease;
    z-index: 10000;
}

.modal-overlay.show .modal-container {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #8da925;
    flex-shrink: 0;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #e9ecef;
    color: #333;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(85vh - 100px);
    min-height: 300px;
    flex: 1;
}

.modal-body p {
    font-family: 'Berthold_regular';
    font-size: 1.2rem;
    line-height: 1.5;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body strong {
    color: #333;
    font-weight: 600;
}

.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-error {
    color: #dc3545;
    text-align: center;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container {
        margin: 20px;
        max-width: calc(100vw - 40px);
        min-width: 300px;
        max-height: calc(100vh - 40px);
        min-height: 350px;
    }

    .modal-header {
        padding: 15px 20px 10px;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .modal-body {
        padding: 20px;
        max-height: calc(100vh - 120px);
        min-height: 250px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .modal-container {
        min-width: 600px;
        max-width: 700px;
    }
}

@media (min-width: 1025px) {
    .modal-container {
        min-width: 700px;
        max-width: 800px;
    }
}
