﻿/* Begin of desktop Custom Alert */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.4);
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background-color: #fefefe;
            border: 1px solid #888;
            width: 28%;
            border-radius: 5px;
            overflow: hidden; /* Ensures borders/lines inside respect the modal corners */
        }

        /* Styles for the header (title and close button) */
        .modal-header {
            padding: 10px 20px;
            display: flex; /* Use flexbox to align title and 'x' on the same line */
            justify-content: space-between; /* Puts max space between title and 'x' */
            align-items: center; /* Vertically center them */
            border-bottom: 1px solid #ddd; /* The separation line below the title */
            background-color: #f1f1f1;
        }

        /* Styles for the body (message content) */
        .modal-body {
            padding: 20px;
        }

        #alertTitle {
            margin: 0; /* Remove default margin for better alignment in flex container */
            font-size: 20px;
            color: #333;
        }

        .close-btn {
            color: #aaa;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            line-height: 1; /* Aligns the 'x' vertically nicely */
        }

            .close-btn:hover,
            .close-btn:focus {
                color: #000;
            }
/* End of desktop Custom Alert */

/* Begin Mobile Styles for Custom Alert */
@media only screen and (max-width: 768px) {
    .modal-content {
        width: 90% !important; /* Use most of the screen width */
        margin: 20px; /* Add some margin from screen edges */
        max-width: 400px; /* Maximum width for very large phones */
    }

    .modal-header {
        padding: 15px 20px; /* Slightly larger padding for touch targets */
    }

    .modal-body {
        padding: 25px 20px; /* More padding for better readability */
    }

    #alertTitle {
        font-size: 22px; /* Slightly larger text for mobile */
    }

    .close-btn {
        font-size: 32px; /* Larger close button for easier tapping */
        padding: 5px; /* Larger touch target */
        min-width: 44px; /* Minimum touch target size */
        min-height: 44px; /* Minimum touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Optimization for very small screens */
@media only screen and (max-width: 480px) {
    .modal-content {
        width: 95% !important; /* Even more width usage on very small screens */
        margin: 10px;
    }

    .modal-header {
        padding: 12px 16px;
    }

    .modal-body {
        padding: 20px 16px;
    }

    #alertTitle {
        font-size: 20px;
    }
}

/* Ensure modal is always properly displayed on mobile */
@media only screen and (max-width: 768px) {
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.4);
        justify-content: center;
        align-items: center;
    }
}
/* End of Mobile Styles for Custom Alert */

/* Begin of Custom Prompt Dialog */
.prompt-modal {
    display: none; /* This hides it by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    justify-content: center; /* This centers horizontally */
    align-items: center; /* This centers vertically */
}

.prompt-modal-content {
    background-color: #fefefe;
    border: 1px solid #888;
    width: 400px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.prompt-modal-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    background-color: #f1f1f1;
}

.prompt-modal-title {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

.prompt-close-btn {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.prompt-close-btn:hover,
.prompt-close-btn:focus {
    color: #000;
}

.prompt-modal-body {
    padding: 20px;
}

.prompt-message {
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.prompt-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.prompt-input:focus {
    outline: none;
    border-color: #007bff;
}

.prompt-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.prompt-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    min-width: 70px;
}

.prompt-btn-ok {
    background-color: #007bff;
    color: white;
}

.prompt-btn-ok:hover {
    background-color: #0056b3;
}

.prompt-btn-cancel {
    background-color: #6c757d;
    color: white;
}

.prompt-btn-cancel:hover {
    background-color: #545b62;
}

/* Mobile Styles */
@media only screen and (max-width: 768px) {
    .prompt-modal-content {
        width: 90% !important;
        max-width: 400px;
        margin: 20px;
    }
    
    .prompt-btn {
        padding: 10px 20px;
        min-width: 80px;
    }
}
/* End of Custom Prompt Dialog */
