/* --- Styling for the Copy Ayat Modal --- */

.copy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Ensure it's on top of everything */
}

.copy-modal-content {
    background-color: var(--background-color, #fff);
    color: var(--text-color, #333);
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.dark-mode .copy-modal-content {
    background-color: #2c2c2c;
    color: #f0f0f0;
}

.copy-modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color, #333);
}

.copy-modal-content h2 {
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color, #eee);
    padding-bottom: 10px;
}

.copy-modal-body {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.copy-modal-options {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.copy-modal-options fieldset {
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    padding: 10px;
}

.copy-modal-options legend {
    font-weight: bold;
    padding: 0 5px;
}

.copy-modal-options label {
    display: block;
    margin-bottom: 5px;
}

.copy-modal-options .sub-options {
    margin-top: 10px;
    padding-left: 20px;
    border: none;
}

.copy-modal-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#copy-preview-area {
    width: 100%;
    height: 100%;
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
    padding: 10px;
    background-color: var(--background-color-offset, #f1f1f1);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
}

.dark-mode #copy-preview-area {
    background-color: #3a3a3a;
}

#copy-to-clipboard-btn {
    margin-top: 10px;
}

/* --- Styling for the new copy button in the surah view --- */
.translation-actions .fs-copy-icon {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #4caf50; /* Your requested green color */
}

.translation-actions .fs-copy-icon:hover {
    color: #45a049;
}

/* --- Styling for Ayat Selection Banner --- */
#ayat-selection-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--accent-color, #007bff);
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

#ayat-selection-info {
    font-size: 1.1em;
}

.translation-item {
    position: relative; /* This is needed for the child's positioning */
}

/* This container holds the buttons */
.translation-actions {
    /* Position the container on the top right of the translation item */
    position: absolute;
    top: 5px;
    right: 5px;

    /* Use flexbox to manage the buttons inside */
    display: flex;
    flex-direction: row; /* Align buttons horizontally */
    align-items: center; /* Vertically center them */
    gap: 8px; /* Space between the buttons */
}

.translation-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1; /* Ensures icon is not pushed down by line height */
    opacity: 0.6;
    transition: opacity 0.2s;
}

.translation-actions button:hover {
    opacity: 1;
}

/* Ensure the main text doesn't flow underneath the buttons */
.translation-item .translation-text-content {
    padding-right: 60px; /* Adjust this value based on how many buttons you have */
}

/* This specifically targets the icon container in the Word-for-Word view */
.selected-translations .translation-actions {
    position: static; /* Override the absolute positioning */
    display: flex;
    flex-direction: row; /* Align horizontally */
    justify-content: flex-end; /* Push them to the right */
    padding-top: 5px; /* Add some space above */
    gap: 15px; /* Increase space between them */
}

/* We no longer need extra padding on the text when icons are not absolute */
.selected-translations .translation-text-content {
    padding-right: 0;
}
