/**
 * Modern Modal Styles
 * Matches bracket color scheme (#73AD21 green, #4CAF50 action green)
 * Modern, clean design with smooth animations
 */

/* Modal overlay */
.w3-modal {
    z-index: 3;
    display: none;
    padding-top: 50px;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease;
}

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

/* Modal content box */
.w3-modal-content {
    margin: auto;
    background-color: #fff;
    position: relative;
    padding: 0;
    outline: 0;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.w3-animate-top {
    animation: slideDown 0.3s ease;
}

.w3-card-4 {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Modal container - main content area */
.modalContainer {
    background: linear-gradient(135deg, #f8fbf8 0%, #ffffff 100%);
    min-height: 400px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    border-radius: 12px;
}

.modalContainer h1 {
    color: #73AD21;
    font-size: 5vh;
    font-weight: bold;
    margin: 0 0 30px 0;
    padding: 0;
}

.modalContainer h2 {
    color: #73AD21;
    font-size: 4vh;
    font-weight: bold;
    margin: 0 0 15px 0;
}

/* Modern close button */
.modalCloseButton {
    background: linear-gradient(135deg, #73AD21 0%, #5a8b1a 100%);
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    font-size: 3vh;
    font-weight: normal;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(115, 173, 33, 0.3);
}

.modalCloseButton:hover {
    background: linear-gradient(135deg, #5a8b1a 0%, #487015 100%);
    box-shadow: 0 6px 16px rgba(115, 173, 33, 0.4);
    transform: translateY(-2px);
}

.modalCloseButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(115, 173, 33, 0.3);
}

/* Team selection boxes in modal */
.teamBox {
    position: absolute;
    left: 5%;
    width: 90%;
    height: 20%;
    border: 3px solid #73AD21;
    text-align: center;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.teamBox:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
    border-color: #5a8b1a;
}

.teamBox:active {
    transform: scale(0.98);
}

/* Winner highlight */
.teamBox[style*="border:3px solid #e6e600"] {
    border: 4px solid #ffd700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 4px 12px rgba(76, 175, 80, 0.2);
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

/* Team text styling */
.teamText {
    position: absolute;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 4vh;
    font-weight: normal;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Game info text */
#gameInfo {
    background: linear-gradient(135deg, #f8fbf8 0%, #ffffff 100%);
}

/* VS text between teams */
div[style*="vs"] {
    color: #73AD21;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Confirmation modal styling */
div[id^="confirmWinner"] {
    background: linear-gradient(135deg, #f8fbf8 0%, #ffffff 100%);
}

div[id^="confirmWinner"] h1 {
    color: #73AD21;
    font-size: 5vh;
    font-weight: bold;
    margin-bottom: 35px;
}

/* Info text in modals */
.modalContainer > div[style*="font-size: 2vh"],
.modalContainer > div[style*="font-size: 3vh"] {
    color: #333;
    line-height: 1.6;
}

/* Clear winner button */
button.teamBox[style*="Clear"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border-color: #ff6b6b;
    font-size: 8;
    font-weight: bold;
}

button.teamBox[style*="Clear"]:hover {
    background: linear-gradient(135deg, #ee5a52 0%, #dc4c41 100%);
    border-color: #ee5a52;
}

/* Disabled state */
.teamBox[style*="background-color:#c2d6d6"] {
    background: linear-gradient(135deg, #e0e7e7 0%, #c2d6d6 100%) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.teamBox[style*="background-color:#cbe7cb"] {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
    color: #2e7d32 !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .w3-modal-content {
        max-width: 95%;
        margin: 20px auto;
    }
    
    .modalContainer {
        padding: 30px 20px;
        min-height: 300px;
    }
    
    .modalContainer h1 {
        font-size: 4vh;
    }
    
    .modalCloseButton {
        padding: 15px 32px;
        font-size: 3vh;
    }
    
    .teamText {
        font-size: 3vh;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.modalContainer.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Success state */
.modalContainer.success h1 {
    color: #4CAF50;
}

/* Error state */
.modalContainer.error h1 {
    color: #f44336;
}

/* Smooth focus states */
.modalCloseButton:focus,
.teamBox:focus {
    outline: 3px solid rgba(115, 173, 33, 0.5);
    outline-offset: 2px;
}

/* Date/time/location text */
div[style*="72%"] {
    color: #666;
    font-weight: normal;
    font-style: normal;
}
