/* Base styles */
.msg_container {
    opacity: 0;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -100%);
    background: linear-gradient(90deg, rgba(var(--primary-color),0.2), rgba(var(--secondary-color),0.5));
    background-color: rgba(var(--bg-color),1);
    flex-direction: column;
    box-sizing: border-box;
    padding: 1em 2em;
    min-width: 30vw;
    border-radius: 1em;
    pointer-events: none;
    gap: 2em;
    transition: none;
    z-index: 100;
}

.active_msg {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: all !important;
    transform: translate(-50%, -50%) !important;
    transition: all 0.5s ease !important;

}  

.msg_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.msg_top button {
    border: none;
    background-color: transparent;
    width: 1.3em;
    height: 1.3em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.msg_top button svg {
    transition: all 0.3s ease;
}

.msg_top button:hover svg {
    fill: rgba(var(--primary-color),1);
}

.msg_midd {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 1em;
}

.msg_bott {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5em;
}

.msg_bott button, .msg_bott a {
    padding: 0;
    font-size: 1rem;
    padding: 0.5em 1em;
    border-radius: 0.3em;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid rgba(var(--text-color),0.5);
    transition: all 0.3s ease;
    margin: 0;
}

.msg_bott button:hover , .msg_bott a:hover{
    border-radius: 1em;
    background-color: rgba(var(--primary-color),0.6);
}

.ok_btn {
    background-color: rgba(var(--primary-color),0.6);
}

.ok_btn:hover {
    background-color: rgba(var(--primary-color),1);
}

.msg_input_box {
    display: flex;
    align-items: start;
    gap: 1em;
    justify-content: space-between;
}

.msg_input_box label {
    flex: 0.3;
    white-space: nowrap;
    min-width: 65px;
}

.msg_input_box input, 
.msg_input_box textarea, 
.msg_input_box select {
    padding: 0.2em 0.5em;
    box-sizing: border-box;
    width: 80%;
    min-width: 100px;
    border-radius: 0.5em;
    outline: none;
    border: 1px solid rgb(71, 71, 71);
    font-size: 1rem;
}

.watchlist_types {
    display: flex;
    flex: 1;
    justify-content: space-around;
    gap: 0.5em;
}

.watchlist_types input {
    display: none;
}

.watchlist_types label {
    flex: 1;
    border-radius: 0.5em;
    background-color: rgba(var(--primary-color),0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    padding: 1%;
    align-items: center;
    white-space: nowrap;
    justify-content: center;
    gap: 0.5em;
    aspect-ratio: 4/2;
}

.watchlist_types label svg {
    height: 2.5vh;
    min-height: 2vh;
    aspect-ratio: 1;
    z-index: 1;
    fill: rgba(var(--text-color),1);
    flex-shrink: 0.5;
}

.watchlist_types label:hover, 
.watchlist_types .active_msg_watchlist {
    background-color: rgba(var(--secondary-color),0.7);
}

#quick_msg {
    height: fit-content;
}

.quick_msg_title {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    font-size: 1.5em;
    gap: 0.5em;
}

.quick_msg_title svg {
    height: 1em !important;
    width: 1em !important;
}

#quick_msg_text {
    font-size: 1.3em;
    text-align: right;
}

input[type="radio"]:checked + label {
    background-color: rgba(var(--secondary-color),0.7);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .msg_container {
        min-width: 40vw;
    }
}

@media (max-width: 992px) {
    .msg_container {
        min-width: 50vw;
    }
    
    .watchlist_types {
        flex-wrap: wrap;
    }
    
    .watchlist_types label {
        padding: 2%;
    }
}

@media (max-width: 768px) {
    .msg_container {
        min-width: 70vw;
        padding: 1em;
        gap: 1em;
    }
    
    .quick_msg_title,
    #quick_msg_text {
        font-size: 1.1em;
    }
    
    .msg_bott button, .msg_bott a {
        padding: 0.4em 0.8em;
    }
    
    .watchlist_types label {
        font-size: 0.9em;
    }
}

@media (max-width: 576px) {
    .msg_container {
        min-width: 85vw;
        padding: 1em;
    }
    
    .msg_top h2 {
        font-size: 1.2em;
    }
    
    .quick_msg_title,
    #quick_msg_text {
        font-size: 1em;
    }
    
    .watchlist_types {
        flex-direction: row;
        gap: 0.5em;

    }
    
    .watchlist_types label {
        flex-direction: row;
        padding: 0.5em;
        font-size: 0.8em;
    }
    
    .watchlist_types label svg {
        height: 2vh;
    }
    
    .msg_bott {
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .msg_container {
        min-width: 90vw;
        padding: 1em;
    }
    
    .msg_top h2 {
        font-size: 1em;
    }
    
    .msg_bott button, .msg_bott a {
        font-size: 0.8em;
    }
    
    .watchlist_types label {
        font-size: 0.7em;
    }
}

/* Special case for very short screens */
@media (max-height: 600px) {
    .msg_container {
        min-height: 10vh;
        overflow-y: auto;
        max-height: 80vh;
    }
}


