/* RTN CTA Shortcodes Styles */

/* TinyMCE Modal Image Preview Styles */
.rtn-image-preview-container {
    padding: 15px;
    border: 2px dashed #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    min-height: 175px;
    max-width: none;
    box-sizing: border-box;
}

.rtn-image-preview-container img {
    
}

.rtn-image-preview-wrapper {
    text-align: center;
    width: 100%;
    overflow: hidden;
}

.rtn-image-preview-img {
    max-width: 100%;
    max-height: 120px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.rtn-image-preview-placeholder {
    color: #666;
    font-size: 14px;
}

.rtn-image-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.rtn-select-image-btn {
    background: #0073aa;
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.rtn-select-image-btn:hover {
    background: #005a87;
}

.rtn-image-preview-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    justify-content: center;
}

.rtn-change-image-btn {
    background: #0073aa;
    color: white !important;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    transition: background-color 0.3s ease;
}

.rtn-change-image-btn:hover {
    background: #005a87;
}

/* Base CTA Box Styles */
cta {
    display: block;
}

cta, .rtn_cta_box {
    margin: 20px 0;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    direction: rtl;
    text-align: right;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow: hidden;
}
.rtn_cta_box a>img {
    margin: 0 !important;
}

cta:hover, .rtn_cta_box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.rtn_cta_wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Image Wrapper */
.rtn_cta_image_wrapper {
    flex: 0 0 auto;
}

.rtn_cta_image_wrapper img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Content Wrapper */
.rtn_cta_content_wrapper {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow: hidden;
}

.rtn_cta_content_wrapper.text-center {
    text-align: center;
}

/* Title Styles */
.rtn_title_box {
    display: block;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Description Styles */
.rtn_desc_box {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 20px;
    margin-top: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Button Styles */
.rtn-ctabox-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rtn-ctabox-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.rtn-ctabox-btn img {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.rtn-ctabox-btn:hover img {
    transform: translateX(-2px);
}

/* Newsletter Form Styles */
.rtn_cta_form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.rtn_email {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    direction: rtl;
    text-align: right;
    transition: border-color 0.3s ease;
}

.rtn_email:focus {
    outline: none;
    border-color: #fed813;
    box-shadow: 0 0 0 3px rgba(254, 216, 19, 0.1);
}

.rtn_cta_form button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.rtn_cta_form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .rtn_cta_wrapper {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .rtn_cta_image_wrapper img {
        max-width: 150px;
    }
    
    .rtn_title_box {
        font-size: 1.2em;
    }
    
    .rtn_desc_box {
        font-size: 0.9em;
    }
    
    .rtn_cta_form {
        flex-direction: column;
        width: 100%;
    }
    
    .rtn_email {
        width: 100%;
        min-width: auto;
    }
    
    .rtn_cta_form button {
        width: 100%;
    }
    
    .rtn-ctabox-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .rtn_cta_box {
        padding: 15px;
        margin: 15px 0;
    }
    
    .rtn_title_box {
        font-size: 1.1em;
    }
    
    .rtn_desc_box {
        font-size: 0.85em;
    }
    
    .rtn-ctabox-btn {
        padding: 8px 16px;
        font-size: 0.85em;
    }
}

/* RTL Support */
.rtl .rtn_cta_box {
    direction: rtl;
    text-align: right;
}
.rtl .rtn_cta_box a.rtn-ctabox-btn {
    float: left;
}

.rtl .rtn_cta_content_wrapper.text-center {
    text-align: right;
}

.rtl .rtn_email {
    direction: rtl;
    text-align: right;
}

/* Animation for form submission */
.rtn_cta_form.submitting button {
    opacity: 0.7;
    cursor: not-allowed;
}

.rtn_cta_form.submitting button::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.rtn_cta_message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
}

.rtn_cta_message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rtn_cta_message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}