/**
 * Text Generator Widget Styles
 */

.unlockafe-text-generator-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.unlockafe-text-generator-content {
    min-height: 100px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
    line-height: 1.6;
    white-space: pre-line; /* Preserve line breaks in the text */
}

.unlockafe-text-generator-button-wrapper {
    display: flex;
    justify-content: flex-start;
}

.unlockafe-generate-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #4054b2;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unlockafe-generate-button:hover {
    background-color: #3448a0;
}

/* Modal Styles - Enhanced for Elementor compatibility */
.unlockafe-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.25s, opacity 0.25s 0s;
}

.unlockafe-modal-overlay.active {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.unlockafe-modal {
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 20px;
    position: relative;
    font-family: Roboto, Arial, Helvetica, sans-serif;
}

.unlockafe-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.unlockafe-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #444;
    margin: 0;
    line-height: 1.2;
}

.unlockafe-modal-close {
    background: none;
    border: none;
    color: #a4afb7;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.unlockafe-modal-close:hover {
    color: #6d7882;
}

.unlockafe-modal-body {
    padding: 20px;
    background-color: #fff;
}

.unlockafe-modal-form-group {
    margin-bottom: 20px;
}

.unlockafe-modal-form-group:last-child {
    margin-bottom: 0;
}

.unlockafe-modal-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #556068;
    font-size: 14px;
}

.unlockafe-modal-input,
.unlockafe-modal-select,
.unlockafe-modal-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d5dadf;
    border-radius: 3px;
    background-color: #ffffff;
    font-size: 14px;
    color: #495157;
    transition: all 0.3s ease;
    box-shadow: none;
    line-height: 1.5;
}

.unlockafe-modal-input:focus,
.unlockafe-modal-select:focus,
.unlockafe-modal-textarea:focus {
    border-color: #4054b2;
    outline: none;
    box-shadow: 0 0 0 1px rgba(64, 84, 178, 0.3);
}

.unlockafe-modal-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.unlockafe-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid #eaeaea;
    background-color: #f7f7f7;
    gap: 10px;
    position: sticky;
    bottom: 0;
    z-index: 1;
}

.unlockafe-modal-button {
    padding: 10px 20px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    text-transform: none;
    text-shadow: none;
    line-height: 1.5;
}

.unlockafe-modal-cancel {
    background-color: #f1f3f5;
    color: #6d7882;
}

.unlockafe-modal-cancel:hover {
    background-color: #e8eaed;
}

.unlockafe-modal-submit {
    background-color: #4054b2;
    color: #ffffff;
}

.unlockafe-modal-submit:hover {
    background-color: #3448a0;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .unlockafe-modal {
        width: 95%;
        max-height: 95vh;
        margin: 0 10px;
    }
    
    .unlockafe-modal-header,
    .unlockafe-modal-body,
    .unlockafe-modal-footer {
        padding: 15px;
    }
    
    .unlockafe-modal-title {
        font-size: 18px;
    }
    
    .unlockafe-modal-button {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* Loading Animation */
@keyframes unlockafe-spin {
    to {
        transform: rotate(360deg);
    }
}
