﻿/**
 * selection-translator.css - Styles for text selection translation popup
 * Compatible with RTL (Hebrew/Aramaic)
 * Matches styles from AramicDictionary.aspx
 */

/* Main popup container */
.selection-translator-popup {
    position: absolute;
    width: 500px;
    background: #ffffff;
    border: 1px solid #b6a258;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-family: Arial, sans-serif;
    font-size: 14px;
    direction: rtl;
    text-align: right;
}

    .selection-translator-popup input[type="radio"] {
        margin-left: 5px;
        vertical-align: middle;
    }

    .selection-translator-popup input[type="checkbox"] {
        margin-left: 5px;
        vertical-align: middle;
    }

    .selection-translator-popup label {
        cursor: pointer;
        vertical-align: bottom;
        margin-left: 5px;
        font-weight: normal;
    }


/* Popup header (draggable area) */
.popup-header {
    background: #ede4c0;
    border-bottom: 1px solid #dddddd;
    padding: 10px 15px;
    cursor: move;
    position: relative;
    border-radius: 4px 4px 0 0;
}

.popup-title {
    font-weight: bold;
    color: #761c21;
    font-size: 14px;
    display: inline-block;
    margin-right: 30px;
}

/* Close button */
.popup-close {
    position: absolute;
    left: 10px;
    top: 8px;
    background: #6e1f24;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    padding: 0;
    transition: background 0.2s;
}

    .popup-close:hover {
        background: #cc0000;
    }

    .popup-close:active {
        background: #990000;
    }

/* Language toggle section */
.popup-language-toggle {
    padding: 10px 15px;
    background: #fafafa;
    border-bottom: 1px solid #eeeeee;
    font-size: 13px;
}


/* Translation result box */
.popup-translation-box {
    padding: 15px;
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
    background: #ffffff;
    line-height: 19px;
}

/* Loading indicator */
.popup-loading {
    text-align: center;
    color: #666666;
    font-style: italic;
    padding: 20px;
}

/* Translation result content */
.popup-translation-result {
    color: #333333;
    font-size: 14px;
    word-wrap: break-word;
    line-height: 19px;
}

/* Error message */
.popup-error {
    color: #cc0000;
    text-align: center;
    padding: 20px;
    font-weight: bold;
}

/* Highlighting checkbox */
.popup-checkbox {
    padding: 10px 15px;
    background: #fafafa;
    border-top: 1px solid #eeeeee;
    font-size: 12px;
}

    .popup-checkbox input[type="checkbox"] {
        margin-left: 5px;
        vertical-align: middle;
    }

    .popup-checkbox label {
        cursor: pointer;
        vertical-align: middle;
    }

    /* Found/Not Found highlighting indicators in checkbox label */
    .popup-checkbox .found {
        text-decoration: underline;
        text-decoration-color: lightgreen;
        text-decoration-thickness: 3px;
        padding: 0 2px;
    }

    .popup-checkbox .notfound {
        text-decoration: underline;
        text-decoration-color: lightpink;
        text-decoration-thickness: 3px;
        padding: 0 2px;
    }

/* Character limit warning */
.popup-char-limit {
    padding: 8px 15px;
    background: #6e1f24;
    border-top: 1px solid #ffc107;
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    border-radius: 0 0 4px 4px;
}

/* Translation highlighting (in result) - matching AramicDictionary.aspx */
.popup-translation-result .found {
    text-decoration: none;
    text-decoration-color: lightgreen;
    text-decoration-thickness: 3px;
}

.popup-translation-result .notfound {
    text-decoration: none;
    text-decoration-color: lightpink;
    text-decoration-thickness: 3px;
}

/* Translation link (for multiple translations) */
.popup-translation-result .translation-link {
    color: #000;
    text-decoration: none;
    cursor: pointer;
    background-color: #ffecb2;
}

    .popup-translation-result .translation-link:hover {
        color: #761c21;
    }

/* More Translations Dropdown - matching AramicDictionary.aspx */
#moreTranslations_content {
    position: absolute;
    z-index: 10000;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}

    #moreTranslations_content .ui-menu-item {
        padding: 2px 5px;
        cursor: pointer;
    }

        #moreTranslations_content .ui-menu-item:hover,
        #moreTranslations_content .ui-menu-item.ui-state-hover {
            background-color: #f0f0f0;
        }

        #moreTranslations_content .ui-menu-item a {
            text-decoration: none;
            color: #000;
            display: block;
        }

            #moreTranslations_content .ui-menu-item a:hover {
                background-color: #ffffcc;
            }

/* Scrollbar styling for translation box */
.popup-translation-box::-webkit-scrollbar {
    width: 8px;
}

.popup-translation-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.popup-translation-box::-webkit-scrollbar-thumb {
    background: #888888;
    border-radius: 4px;
}

    .popup-translation-box::-webkit-scrollbar-thumb:hover {
        background: #555555;
    }

/* Responsive adjustments for smaller screens */
@media (max-width: 580px) {
    .selection-translator-popup {
        width: 90%;
        max-width: 500px;
    }
}

/* Print: hide popup */
@media print {
    .selection-translator-popup {
        display: none !important;
    }
}
