/* Mobile Responsive Modal Styles */

/* Modal base styles */
.modal-dialog {
    max-width: 90%;
    margin: 1.75rem auto;
}

.modal-footer {
    justify-content: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Exit button styles */
.btn-exit {
    background: linear-gradient(135deg, #e63946, #9e2a2b);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 8px 18px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(230, 57, 70, 0.3);
}

.btn-exit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(230, 57, 70, 0.4);
    color: white;
    background: linear-gradient(135deg, #ff6b6b, #e63946);
}

.btn-exit:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(230, 57, 70, 0.3);
}

/* Large exit button at bottom of modal */
.btn-exit-large {
    background: linear-gradient(135deg, #e63946, #9e2a2b);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 25px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(230, 57, 70, 0.3);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.btn-exit-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(230, 57, 70, 0.4);
    color: white;
    background: linear-gradient(135deg, #ff6b6b, #e63946);
}

.btn-exit-large:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(230, 57, 70, 0.3);
}

.btn-exit-large i {
    font-size: 1.2rem;
}

.modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-backdrop.show {
    opacity: 0.7;
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 992px) {
    .modal-title {
        font-size: 1.4rem;
    }
    
    .modal-title i {
        font-size: 1.4rem;
    }
    
    .competition-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .modal-title i {
        font-size: 1.2rem;
        margin-left: 8px;
    }
    
    .modal-body {
        padding: 15px 12px;
    }
    
    .competition-name {
        font-size: 1.3rem;
        gap: 10px;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }
    
    .competition-name i {
        font-size: 1.3rem;
    }
    
    .competition-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .meta-item {
        font-size: 1rem;
        padding: 8px 12px;
        margin-bottom: 5px;
    }
    
    .meta-item i {
        font-size: 1.1rem;
        width: 25px;
        height: 25px;
    }
    
    .medal-summary {
        margin-top: 15px;
    }
    
    .medal-summary .row {
        margin: 0 -5px;
    }
    
    .medal-summary .col-md-4 {
        padding: 0 5px;
        margin-bottom: 10px;
    }
    
    .winner-card {
        padding: 12px 8px;
    }
    
    .medal-badge i {
        font-size: 2rem;
    }
    
    .winner-name {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    .winner-team {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .winner-result {
        font-size: 1.1rem;
        padding: 5px 12px;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        max-width: 98%;
        margin: 0.5rem auto;
    }
    
    .modal-header {
        padding: 12px 10px;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-title i {
        font-size: 1.1rem;
        margin-left: 6px;
    }
    
    .modal-body {
        padding: 10px 8px;
    }
    
    .competition-name {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .competition-name i {
        font-size: 1.1rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-print, .btn-close, .btn-exit {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    .btn-exit-large {
        padding: 10px 15px;
        font-size: 1rem;
    }
    
    /* Make exit button more prominent on mobile */
    .btn-exit {
        width: 100%;
        justify-content: center;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    
    /* Table adjustments for very small screens */
    .table-responsive {
        margin: 0 -8px;
        padding: 0 8px;
        width: calc(100% + 16px);
    }
    
    .results-table {
        min-width: 600px;
    }
    
    .results-table th, 
    .results-table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .results-table tr.medal-gold td,
    .results-table tr.medal-silver td,
    .results-table tr.medal-bronze td {
        font-size: 1rem;
    }
    
    .results-table th {
        font-size: 0.95rem;
        padding: 10px 8px;
    }
}

/* Print modal improvements */
@media print {
    .modal {
        position: absolute;
        left: 0;
        top: 0;
        margin: 0;
        padding: 0;
        overflow: visible !important;
    }
    
    .modal-dialog {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .modal-content {
        border: none;
        box-shadow: none;
    }
    
    .modal-header,
    .modal-footer,
    .btn-close,
    .btn-print {
        display: none !important;
    }
    
    .modal-body {
        padding: 0;
    }
}
