/* Block Save Button Styles */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

/* Background Upload Improvements */
.upload-img-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.upload-img-container:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.upload-background {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-background:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.img-preview {
    border-radius: 6px;
    transition: all 0.3s ease;
}

.delete-img {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.upload-img-container:hover .delete-img {
    opacity: 1;
}

.delete-img:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* Block Section Improvements */
.accordion-item {
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.accordion-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.accordion-item__button {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
    padding: 16px 20px;
    transition: all 0.3s ease;
}

.accordion-item__button:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #007bff;
}

.accordion-content {
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 20px;
    background: #ffffff;
}

/* Form Field Improvements */
.AZ-field-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.field_inner input,
.field_inner textarea {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.field_inner input:focus,
.field_inner textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Checkbox Improvements */
.radio__toggle {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.radio__toggle:checked {
    background: #007bff;
    border-color: #007bff;
}

.filter__title {
    font-weight: 500;
    color: #495057;
    margin: 0;
}

/* Loading Animation */
.btn.loading,
.AZ-primary-btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after,
.AZ-primary-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success Message Styling */
.message-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    padding: 16px 20px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Block Type Badge */
.block-type-badge {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .accordion-item__button {
        padding: 12px 16px;
        font-size: 14px;
    }

    .accordion-content {
        padding: 16px;
    }

    .btn-success {
        padding: 8px 16px;
        font-size: 14px;
    }

    .message-alert {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* Image Block Styles */
.block.image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.block.image img {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.block.image:hover img {
    transform: scale(1.02);
}

.block.image a {
    display: block;
    text-decoration: none;
}

.block.image .text-muted {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.block.image .text-muted:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

/* Fixed Background Preview Indicator */
.fixed-background-preview {
    position: relative;
}

.fixed-background-preview::before {
    content: 'Fixed BG';
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    z-index: 15;
    text-transform: uppercase;
}

/* Image Upload Specific Styles */
.upload-img-container .img-preview {
    max-width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

/* Image Block Admin Preview */
.image-block-preview {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.image-block-preview:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

/* Video Block Styles */
.block.video {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.block.video video {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.block.video:hover video {
    transform: scale(1.02);
}

.block.video .text-muted {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.block.video .text-muted:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

/* Video Upload Specific Styles */
.upload-img-container video.img-preview {
    max-width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

/* Video Block Admin Preview */
.video-block-preview {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.video-block-preview:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

/* Carousel Block Styles */
.block.carousel {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.block.carousel .carousel {
    border-radius: 8px;
    overflow: hidden;
}

.block.carousel .carousel-item img {
    transition: all 0.3s ease;
}

.block.carousel:hover .carousel-item img {
    transform: scale(1.02);
}

.block.carousel .carousel-caption {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    border-radius: 0 0 8px 8px;
    padding: 20px;
}

.block.carousel .carousel-control-prev,
.block.carousel .carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: all 0.3s ease;
}

.block.carousel:hover .carousel-control-prev,
.block.carousel:hover .carousel-control-next {
    opacity: 1;
}

.block.carousel .carousel-indicators {
    margin-bottom: 1rem;
}

.block.carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.block.carousel .carousel-indicators button.active {
    background-color: #007bff;
}

.block.carousel .text-muted {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.block.carousel .text-muted:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

/* Carousel Item Thumbnail in Admin */
.carousel-item-thumb {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.carousel-item-thumb:hover {
    border-color: #007bff;
    transform: scale(1.1);
}

/* Carousel Admin Table Improvements */
.table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.list-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.list-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Carousel Item Modal Styles */
.modal-wrapper.addBlock-modal .modal-content {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-wrapper.addBlock-modal .modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
    padding: 20px;
}

.modal-wrapper.addBlock-modal .modal-title {
    font-weight: 600;
    color: #495057;
}

.modal-wrapper.addBlock-modal .modal-body {
    padding: 24px;
}

.modal-wrapper.addBlock-modal .upload-img-container {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.modal-wrapper.addBlock-modal .upload-img-container:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.modal-wrapper.addBlock-modal .upload-img {
    display: block;
    cursor: pointer;
    position: relative;
}

.modal-wrapper.addBlock-modal .img-preview {
    max-width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.modal-wrapper.addBlock-modal .file-input {
    display: none;
}

.modal-wrapper.addBlock-modal .delete-img {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-wrapper.addBlock-modal .upload-img-container:hover .delete-img {
    opacity: 1;
}

.modal-wrapper.addBlock-modal .delete-img:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.modal-wrapper.addBlock-modal .AZ-field-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.modal-wrapper.addBlock-modal .field_inner input,
.modal-wrapper.addBlock-modal .field_inner textarea {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 14px;
    width: 100%;
}

.modal-wrapper.addBlock-modal .field_inner input:focus,
.modal-wrapper.addBlock-modal .field_inner textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.modal-wrapper.addBlock-modal .modal-footer {
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    padding: 16px 24px;
}

.modal-wrapper.addBlock-modal .AZ-primary-btn,
.modal-wrapper.addBlock-modal .AZ-secondary-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-wrapper.addBlock-modal .AZ-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.modal-wrapper.addBlock-modal .AZ-secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Divider Block Styles */
.block.divider {
    transition: all 0.3s ease;
}

.block.divider hr {
    transition: all 0.3s ease;
}

.divider-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.divider-preview:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

/* Embed Frame Block Styles */
.block.embed-frame {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.block.embed-frame iframe {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.block.embed-frame:hover iframe {
    transform: scale(1.02);
}

.embed-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.embed-preview:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.embed-preview iframe {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.embed-preview:hover iframe {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

/* Color Input Styling */
input[type="color"] {
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="color"]:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* URL Input Styling */
input[type="url"] {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

input[type="url"]:focus {
    font-family: inherit;
    font-size: 14px;
}
