/* Modal Styles for Chess Application */
/* This file contains all modal-related CSS styles */

/* Base Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #222;
    color: #fff;
    padding: 28px 24px 20px 24px;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    text-align: center;
    min-width: 280px;
    position: relative;
    font-family: 'Segoe UI', 'Arial', 'Helvetica Neue', sans-serif;
}

.modal-content p {
    margin-bottom: 18px;
    font-size: 1.1em;
}

.modal-content button {
    margin: 0 8px;
    background: #2ecc71;
    color: black;
    font-weight: normal;
    z-index: 1001;
    position: relative;
}

.modal-content button:hover {
    background: #28b765;
}

/* Modal Close Button */
.modal-close {
    position: absolute !important;
    top: 10px;
    right: 14px;
    background: none !important;
    border: none !important;
    font-size: 1.5em;
    color: #ccc !important;
    cursor: pointer;
    padding: 0 !important;
    z-index: 1002;
    transition: color 0.2s;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    display: block;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-weight: normal !important;
    line-height: 1 !important;
    vertical-align: baseline !important;
}

.modal-close:hover,
.modal-close:focus {
    color: white !important;
    outline: none !important;
    background: none !important;
    transform: none !important;
}

/* Timeout Modal Button Styles */
.timeout-button {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2ecc71;
    color: white;
}

.timeout-button:hover {
    background: #27ae60;
}

/* Promotion Modal Styles */
#promotionChoices img {
    transition: transform 0.2s ease, filter 0.2s ease;
    border-radius: 4px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
}

#promotionChoices img:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

#promotionChoices img:active {
    transform: scale(0.95);
}

/* Menu Modal Specific Styles */
#menuModal .modal-content {
    min-width: 400px;
    max-width: 400px;
    width: 400px;
    height: 640px;
    background: linear-gradient(to bottom, #1a1a1a, #111);
    border: 1px solid #2d2d2d;
}

/* Menu Item Styles */
.menu-item {
    padding: 10px 0;
    border-radius: 5px;
    transition: background 0.18s, color 0.18s;
    text-align: center;
}

.menu-item:hover,
.menu-item:focus {
    background: #ffe066;
    color: #111;
    outline: none;
}

/* Settings Modal Styles */
.settings-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.tab-icon {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.tab-icon:hover {
    background: #333;
}

.tab-icon.active {
    border-bottom-color: #2ecc71;
}

.tab-icon.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2ecc71;
}

.tab-content {
    min-height: 200px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    font-weight: 500;
    color: #ddd;
}

.setting-dropdown {
    background: #333;
    border: 1px solid #555;
    color: #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    min-width: 120px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-dropdown:hover {
    background: #444;
}

.dropdown-text {
    flex: 1;
    text-align: left;
}

.dropdown-arrow {
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.setting-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    margin-top: 2px;
    z-index: 1003;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-option:hover {
    background: #444;
}

.dropdown-option.selected {
    background: #2ecc71;
    color: #111;
}

/* Responsive Design for Modals */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        min-width: 250px;
        padding: 20px 16px 16px 16px;
    }
    
    .timeout-button {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    #menuModal .modal-content {
        min-width: 300px;
        max-width: 300px;
        width: 300px;
        height: 500px;
    }
}




