.copy-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    padding-right: 40px; /* Leave room for the button */
    box-sizing: border-box;
    font-family: monospace;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

/* Hide the success icon by default */
.copy-btn .success-icon {
    display: none;
    color: #28a745;
}

/* Class applied via JS when copied successfully */
.copy-btn.copied .copy-icon {
    display: none;
}

.copy-btn.copied .success-icon {
    display: inline-block;
}

.copy-btn.copied {
    border-color: #28a745;
    background: #e8f5e9;
}
