/**
 * CheeseClue - Modal Styles
 * Styles for all modal dialogs
 */

/* Base Modal Styles */
.modal-content {
    background-color: #ffffff;
    border-radius: 15px;
    border: none;
    overflow: hidden;
    max-height: 90vh;
}

/* Close Button */
.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    opacity: 1;
}

/* Coming Soon Modal */
#comingSoonModal .modal-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
    text-align: center;
}

#comingSoonModal .modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

#comingSoonModal .modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    color: #495057;
}

.coming-soon-section {
    margin-bottom: 2rem;
}

.coming-soon-section h5 {
    color: #333;
    font-weight: bold;
    margin-bottom: 1rem;
    border-bottom: 2px solid #28a745;
    padding-bottom: 0.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.feature-list li .emoji {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.feature-list li .text {
    flex: 1;
    line-height: 1.4;
}

.feature-list li .text strong {
    color: #28a745;
}

.current-mode {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1.5rem 0;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 1.5rem 0;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.share-btn.facebook {
    background: #4267b2;
}

.share-btn.native {
    background: #6c757d;
}

/* How to Play Modal */
#howToPlayModal .modal-header {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
    text-align: center;
}

#howToPlayModal .modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

#howToPlayModal .modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    color: #495057;
}

.how-to-section {
    margin-bottom: 2rem;
}

.how-to-section h5 {
    color: #333;
    font-weight: bold;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ffc107;
    padding-bottom: 0.5rem;
}

/* Example Elements */
.example-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.example-box {
    width: 40px;
    height: 40px;
    border: 2px solid #495057;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #495057;
}

.example-box.correct {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.example-box.present {
    background-color: #ffc107;
    color: white;
    border-color: #ffc107;
}

.example-box.absent {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.example-box.empty {
    background-color: #e9ecef;
}

.example-spacer {
    width: 16px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #495057;
    font-size: 1.3rem;
}

/* Color Legend */
.color-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.legend-box {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.legend-box.correct {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.legend-box.present {
    background-color: #ffc107;
    color: white;
    border-color: #ffc107;
}

.legend-box.absent {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.legend-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Cheese Result Modal */
#cheeseModal .btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    /*background: rgba(255, 255, 255, 0.8);*/
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.btn-close .close-icon {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

#cheeseModal img {
    max-width: 85%;
    max-height: 50vh;
    margin: 1.5rem auto 0 auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#modal-body-content {
    padding: 1.5rem;
    color: #495057;
}

#modal-body-content h4 {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

#modal-body-content .text-success {
    color: #28a745 !important;
}

#modal-body-content .text-danger {
    color: #dc3545 !important;
}

#modal-body-content .text-muted {
    color: #6c757d !important;
    font-style: italic;
}

.btn-outline-warning {
    color: #856404;
    border-color: #ffc107;
    margin: 4px;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    color: #ffffff;
}

/* Modal Responsive Styles */
@media (min-width: 768px) {
    #comingSoonModal .modal-dialog,
    #howToPlayModal .modal-dialog {
        max-width: 650px;
    }

    #comingSoonModal .modal-body,
    #howToPlayModal .modal-body {
        padding: 2rem;
        max-height: 75vh;
    }

    .share-buttons {
        justify-content: space-around;
    }

    .share-btn {
        flex: 1;
        max-width: 140px;
        justify-content: center;
    }

    .example-row {
        gap: 8px;
    }

    .example-box {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .color-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin: 1.5rem 0;
    }
}

@media (max-width: 767px) {
    #comingSoonModal .modal-dialog,
    #howToPlayModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    #comingSoonModal .modal-body,
    #howToPlayModal .modal-body {
        padding: 1rem;
    }

    .share-btn {
        flex: 1;
        min-width: calc(50% - 5px);
        justify-content: center;
    }

    .example-row {
        gap: 4px;
    }

    .example-box {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .legend-box {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }

    .legend-text {
        font-size: 0.9rem;
    }
}

/* Yellow themed share buttons */
#shareWin {
    background: linear-gradient(135deg, #ffc107, #ffb300) !important;
    border-color: #ffc107 !important;
    color: white !important;
}

#shareWin:hover {
    background: linear-gradient(135deg, #ffb300, #ff9800) !important;
    border-color: #ffb300 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

#shareCopy {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
    background: transparent !important;
}

#shareCopy:hover {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

/* Success state for copy button */
#shareCopy.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* Share button container */
.share-buttons-container {
    gap: 8px;
}

/* Icon styling */
#shareWin i, #shareCopy i {
    margin-right: 4px;
}
/* Play Again Button */
#playAgain {
    background: linear-gradient(135deg, #ffc107, #ffb300) !important;
    border-color: #ffc107 !important;
    color: white !important;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#playAgain:hover {
    background: linear-gradient(135deg, #ffb300, #ff9800) !important;
    border-color: #ffb300 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 193, 7, 0.4);
}

#playAgain:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

#playAgain i {
    margin-right: 6px;
}
/* Modal image scaling - mobile only */
@media (max-width: 767px) {
    #modalImage {
        max-height: 220px !important;
        width: auto !important;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    /* Ensure the image container doesn't exceed the height on mobile */
    .modal-body img {
        max-height: 220px !important;
        width: auto !important;
        object-fit: contain;
    }
}
/* Action buttons styling */
#actionButtons {
    max-width: 500px;
    margin: 0 auto;
}

#actionButtons .btn {
    min-height: 50px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#actionButtons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 193, 7, 0.4);
}

#actionButtons .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    #actionButtons {
        /*flex-direction: column;*/
    }

    #actionButtons .btn {
        width: 50%;
    }
}