/* Translation Editor Styles */
.i18n-translatable {
    position: relative;
    cursor: help;
    transition: all 0.2s;
}

.i18n-editor-active .i18n-translatable:hover {
    outline: 2px solid var(--accent-color);
    background-color: rgba(211, 84, 0, 0.05);
}

.i18n-translatable::after {
    content: "✎";
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    font-size: 10px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.i18n-editor-active .i18n-translatable::after {
    opacity: 0.6;
}

.i18n-editor-active .i18n-translatable:hover::after {
    opacity: 1;
}

/* Modal for editing */
#i18n-editor-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.i18n-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
}

.i18n-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.i18n-modal-header h3 {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.1rem;
}

.i18n-modal-body label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

.i18n-modal-body textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
    margin-bottom: 15px;
    box-sizing: border-box;
}

.i18n-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.i18n-btn {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.i18n-btn-primary {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.i18n-btn:hover {
    filter: brightness(0.9);
}

.i18n-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.i18n-select {
    padding: 4px 8px;
    font-size: 0.85rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Switch Styling */
.i18n-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.i18n-switch-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    user-select: none;
}

.i18n-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.i18n-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.i18n-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 20px;
}

.i18n-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 50%;
}

input:checked+.i18n-slider {
    background-color: var(--accent-color);
}

input:focus+.i18n-slider {
    box-shadow: 0 0 1px var(--accent-color);
}

input:checked+.i18n-slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

/* Dropdown Translation Helper */
.i18n-dropdown-helper {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
    color: var(--accent-color);
    vertical-align: middle;
}

.i18n-editor-active .i18n-dropdown-helper {
    display: inline-block;
}