/* SModal Frontend Styles */

/* Podstawowe style dla modali */
.modal {
    z-index: 9999;
}

.modal-backdrop {
    z-index: 9998;
}

/* Dodatkowe style dla lepszego wyglądu */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
    line-height: 1.6;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Style dla przycisków uruchamiających modal */
.smodal-trigger {
    transition: all 0.3s ease;
}

.smodal-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Animacje dla modali */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: scale(0.8);
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* Responsywność dla małych ekranów */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem 0.5rem;
        max-width: none;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
    }
}

/* Style dla modali pełnoekranowych na małych urządzeniach */
@media (max-width: 768px) {
    .modal-fullscreen-sm-down {
        width: 100vw;
        max-width: none;
        height: 100vh;
        margin: 0;
    }
    
    .modal-fullscreen-sm-down .modal-content {
        height: 100vh;
        border: 0;
        border-radius: 0;
    }
    
    .modal-fullscreen-sm-down .modal-body {
        overflow-y: auto;
    }
}

/* Style dla różnych rozmiarów modali */
.modal-sm {
    max-width: 300px;
}

.modal-lg {
    max-width: 800px;
}

.modal-xl {
    max-width: 1140px;
}

/* Style dla modali wyśrodkowanych w pionie */
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 1rem);
}

/* Dodatkowe style dla treści w modalach */
.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.modal-body h1, 
.modal-body h2, 
.modal-body h3, 
.modal-body h4, 
.modal-body h5, 
.modal-body h6 {
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-body ul, 
.modal-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.modal-body blockquote {
    border-left: 4px solid #007cba;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #666;
}

/* Style dla przycisków w modalach */
.modal-body .btn {
    margin: 0.25rem;
}

/* Loading state dla modali */
.modal-loading {
    text-align: center;
    padding: 2rem;
}

.modal-loading::before {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style dla errorów w modalach */
.modal-error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

/* Style dla sukcesów w modalach */
.modal-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

/* Dostępność - focus states */
.modal-content:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}