.elementor-canto-acf-field {
    margin: 0;
    padding: 0;
}

.elementor-canto-acf-field .acf-field-label {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.elementor-canto-acf-field .acf-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Elementor editor specific styles */
.elementor-editor-active .elementor-canto-acf-field {
    min-height: 50px;
    border: 1px dashed #ddd;
    padding: 10px;
}

.elementor-editor-active .elementor-canto-acf-field:empty::before {
    content: 'Canto ACF Field';
    color: #999;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 20px;
}

.elementor-canto-image-wrapper {
    margin: 0;
    padding: 0;
}

.elementor-canto-image-wrapper .canto-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.elementor-canto-image-wrapper .canto-image-caption {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

/* Elementor editor specific styles */
.elementor-editor-active .elementor-canto-placeholder {
    min-height: 50px;
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elementor-editor-active .elementor-widget-canto_image:not(.elementor-element-editable) {
    cursor: pointer;
}

/* Preview image in editor */
.elementor-control-image_preview .canto-preview-image {
    width: 100%;
    height: 150px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #ddd;
    margin-top: 10px;
}

/* Canto Elementor Integration Styles */

.canto-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canto-modal-content {
    background: white;
    width: 90%;
    max-width: 1200px;
    height: 80%;
    max-height: 800px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.canto-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000000;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.canto-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

#canto-elementor-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .canto-modal-content {
        width: 95%;
        height: 90%;
        margin: 20px;
    }
}

/* Loading state */
.canto-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    background: #f9f9f9;
}

.canto-loading img {
    margin-bottom: 15px;
    width: 32px;
    height: 32px;
}

.canto-loading p {
    margin: 0;
    font-size: 14px;
}

/* Error states */
.canto-error {
    color: #d63638;
    padding: 20px;
    text-align: center;
    background: #fff2f2;
    border: 1px solid #f0c2c2;
    margin: 20px;
    border-radius: 4px;
}

/* Canto Elementor Styles */

.elementor-widget-canto-image .elementor-widget-container {
    position: relative;
}

.elementor-element-wrapper .elementor-element [class*="elementor-widget-canto"] .elementor-element-wrapper-widget i:before,
.elementor-element-wrapper .elementor-element [class*="elementor-widget-canto"] .icon i:before {
    content: '' !important;
    width: 28px !important;
    height: 28px !important;
    display: inline-block !important;
    background-image: url('../canto-icon.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    opacity: 1 !important;
}

.canto-elementor-placeholder {
    text-align: center;
    padding: 20px;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.canto-placeholder-icon {
    width: 24px !important;
    height: 24px !important;
}

.elementor-control-select_image .elementor-button.elementor-button-link {
    background: none;
    border: none;
    padding: 6px 8px;
    color: #556068;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
}

.elementor-control-select_image .elementor-button.elementor-button-link:hover {
    color: #000000;
    background: none;
}

.elementor-control-select_image img {
    vertical-align: middle;
}

/* Panel icon styles */
.elementor-element-wrapper [class*='elementor-widget-canto'] .elementor-element-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.elementor-element-wrapper [class*='elementor-widget-canto'] .elementor-element-icon img {
    width: 28px;
    height: 28px;
    display: block;
} 