/**
 * Editor Visual 2.0 - Estilos dos Elementos
 */

/* ========================================
   ELEMENTOS DENTRO DO CANVAS
   ======================================== */

/* Container de elemento editável */
.mve2-element {
    position: relative;
    outline: none;
    transition: outline 0.15s ease, box-shadow 0.15s ease;
}

.mve2-element:hover {
    outline: 2px dashed rgba(139, 92, 246, 0.5);
    outline-offset: 2px;
}

.mve2-element.selected {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

.mve2-element.dragging {
    opacity: 0.5;
    outline: 2px dashed #8b5cf6;
}

/* Handle de redimensionamento */
.mve2-resize-handle {
    position: absolute;
    background: #8b5cf6;
    border: 2px solid white;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.mve2-element.selected .mve2-resize-handle {
    opacity: 1;
}

.mve2-resize-handle.nw { top: -5px; left: -5px; cursor: nwse-resize; }
.mve2-resize-handle.n { top: -5px; left: 50%; margin-left: -5px; cursor: ns-resize; }
.mve2-resize-handle.ne { top: -5px; right: -5px; cursor: nesw-resize; }
.mve2-resize-handle.w { top: 50%; left: -5px; margin-top: -5px; cursor: ew-resize; }
.mve2-resize-handle.e { top: 50%; right: -5px; margin-top: -5px; cursor: ew-resize; }
.mve2-resize-handle.sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.mve2-resize-handle.s { bottom: -5px; left: 50%; margin-left: -5px; cursor: ns-resize; }
.mve2-resize-handle.se { bottom: -5px; right: -5px; cursor: nwse-resize; }

/* Toolbar do elemento */
.mve2-element-toolbar {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #1e293b;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 101;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.mve2-element.selected .mve2-element-toolbar {
    opacity: 1;
    pointer-events: auto;
}

.mve2-element-toolbar-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s ease;
}

.mve2-element-toolbar-btn:hover {
    background: #334155;
    color: white;
}

.mve2-element-toolbar-btn.danger:hover {
    background: #ef4444;
    color: white;
}

/* ========================================
   SEÇÃO
   ======================================== */
.mve2-section {
    position: relative;
    width: 100%;
    min-height: 100px;
    padding: 40px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mve2-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.mve2-section.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed #374151;
    background: rgba(139, 92, 246, 0.05);
}

.mve2-section.empty::before {
    content: '+ Arraste elementos aqui';
    color: #64748b;
    font-size: 14px;
}

/* ========================================
   COLUNAS
   ======================================== */
.mve2-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.mve2-column {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    padding: 15px;
    position: relative;
}

.mve2-column.empty {
    border: 2px dashed #374151;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.03);
}

.mve2-column.empty::before {
    content: '+';
    color: #64748b;
    font-size: 24px;
}

/* Larguras de coluna */
.mve2-column[data-width="100"] { flex: 0 0 100%; max-width: 100%; }
.mve2-column[data-width="50"] { flex: 0 0 calc(50% - 10px); max-width: calc(50% - 10px); }
.mve2-column[data-width="33"] { flex: 0 0 calc(33.333% - 14px); max-width: calc(33.333% - 14px); }
.mve2-column[data-width="25"] { flex: 0 0 calc(25% - 15px); max-width: calc(25% - 15px); }
.mve2-column[data-width="66"] { flex: 0 0 calc(66.666% - 10px); max-width: calc(66.666% - 10px); }
.mve2-column[data-width="75"] { flex: 0 0 calc(75% - 5px); max-width: calc(75% - 5px); }

/* Separador de coluna para redimensionamento */
.mve2-column-separator {
    position: absolute;
    top: 0;
    right: -10px;
    width: 20px;
    height: 100%;
    cursor: col-resize;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mve2-column-separator::before {
    content: '';
    width: 4px;
    height: 40px;
    background: #8b5cf6;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.mve2-column-separator:hover::before,
.mve2-column.resizing + .mve2-column-separator::before {
    opacity: 1;
}

/* Handle de resize entre colunas (novo sistema) */
.mve2-column-resize-handle {
    flex: 0 0 16px !important;
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: auto;
    min-height: 100px;
    align-self: stretch;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: col-resize !important;
    position: relative;
    z-index: 100;
    margin: 0 -8px;
    background: transparent;
}

.mve2-column-resize-handle .handle-bar {
    width: 6px;
    height: 60px;
    min-height: 40px;
    background: rgba(139, 92, 246, 0.4);
    border-radius: 3px;
    transition: all 0.2s ease;
    pointer-events: none;
}

.mve2-column-resize-handle:hover .handle-bar {
    background: #8b5cf6;
    height: 80px;
    width: 8px;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

.mve2-column-resize-handle.active .handle-bar {
    background: #7c3aed;
    height: 100%;
    width: 8px;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.8);
}

.mve2-column.mve2-resizing {
    outline: 2px solid #8b5cf6 !important;
    outline-offset: -2px;
    background: rgba(139, 92, 246, 0.05) !important;
}

/* ========================================
   CONTAINER
   ======================================== */
.mve2-container-el {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.mve2-container-el[data-width="full"] {
    max-width: 100%;
    padding: 0;
}

.mve2-container-el[data-width="boxed"] {
    max-width: 1000px;
}

.mve2-container-el[data-width="narrow"] {
    max-width: 800px;
}

/* ========================================
   TÍTULO (HEADING)
   ======================================== */
.mve2-heading {
    margin: 0;
    padding: 0;
    color: inherit;
    font-family: inherit;
}

.mve2-heading[data-tag="h1"] { font-size: 48px; font-weight: 700; line-height: 1.2; }
.mve2-heading[data-tag="h2"] { font-size: 36px; font-weight: 700; line-height: 1.25; }
.mve2-heading[data-tag="h3"] { font-size: 28px; font-weight: 600; line-height: 1.3; }
.mve2-heading[data-tag="h4"] { font-size: 22px; font-weight: 600; line-height: 1.35; }
.mve2-heading[data-tag="h5"] { font-size: 18px; font-weight: 600; line-height: 1.4; }
.mve2-heading[data-tag="h6"] { font-size: 16px; font-weight: 600; line-height: 1.45; }

/* ========================================
   TEXTO / PARÁGRAFO
   ======================================== */
.mve2-text {
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.7;
    color: inherit;
}

.mve2-text[contenteditable="true"]:focus {
    outline: none;
}

/* ========================================
   IMAGEM
   ======================================== */
.mve2-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.mve2-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.mve2-image-wrapper.align-left { text-align: left; }
.mve2-image-wrapper.align-center { text-align: center; }
.mve2-image-wrapper.align-right { text-align: right; }

.mve2-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 200px;
    background: #1e293b;
    border: 2px dashed #374151;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mve2-image-placeholder:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.mve2-image-placeholder i {
    font-size: 32px;
}

/* ========================================
   BOTÃO
   ======================================== */
.mve2-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mve2-button-wrapper {
    display: block;
}

.mve2-button-wrapper.align-left { text-align: left; }
.mve2-button-wrapper.align-center { text-align: center; }
.mve2-button-wrapper.align-right { text-align: right; }

/* Estilos de botão */
.mve2-button.style-solid {
    background: #8b5cf6;
    color: white;
}

.mve2-button.style-solid:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.mve2-button.style-outline {
    background: transparent;
    border: 2px solid #8b5cf6;
    color: #8b5cf6;
}

.mve2-button.style-outline:hover {
    background: #8b5cf6;
    color: white;
}

.mve2-button.style-ghost {
    background: transparent;
    color: #8b5cf6;
}

.mve2-button.style-ghost:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* Tamanhos de botão */
.mve2-button.size-sm { padding: 10px 20px; font-size: 14px; }
.mve2-button.size-md { padding: 14px 28px; font-size: 16px; }
.mve2-button.size-lg { padding: 18px 36px; font-size: 18px; }

/* ========================================
   ÍCONE
   ======================================== */
.mve2-icon-el {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mve2-icon-el i {
    font-size: 24px;
    color: inherit;
}

.mve2-icon-el.size-sm i { font-size: 16px; }
.mve2-icon-el.size-md i { font-size: 24px; }
.mve2-icon-el.size-lg i { font-size: 36px; }
.mve2-icon-el.size-xl i { font-size: 48px; }

/* ========================================
   ESPAÇADOR
   ======================================== */
.mve2-spacer {
    width: 100%;
    display: block;
}

.mve2-spacer.editing {
    background: repeating-linear-gradient(
        45deg,
        rgba(139, 92, 246, 0.1),
        rgba(139, 92, 246, 0.1) 5px,
        transparent 5px,
        transparent 10px
    );
    border: 1px dashed rgba(139, 92, 246, 0.3);
    min-height: 20px;
}

/* ========================================
   DIVISOR
   ======================================== */
.mve2-divider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mve2-divider-line {
    flex: 1;
    height: 1px;
    background: #374151;
}

.mve2-divider.style-dashed .mve2-divider-line {
    border-top: 1px dashed #374151;
    background: transparent;
}

.mve2-divider.style-dotted .mve2-divider-line {
    border-top: 1px dotted #374151;
    background: transparent;
}

.mve2-divider-text {
    font-size: 14px;
    color: #64748b;
    white-space: nowrap;
}

/* ========================================
   GALERIA
   ======================================== */
.mve2-gallery {
    display: grid;
    gap: 10px;
}

.mve2-gallery[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.mve2-gallery[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.mve2-gallery[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.mve2-gallery[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }

.mve2-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
}

.mve2-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mve2-gallery-item:hover img {
    transform: scale(1.05);
}

/* ========================================
   VÍDEO
   ======================================== */
.mve2-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
}

.mve2-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.mve2-video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #64748b;
    cursor: pointer;
}

.mve2-video-placeholder i {
    font-size: 48px;
}

/* ========================================
   LISTA
   ======================================== */
.mve2-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mve2-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
}

.mve2-list-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
}

.mve2-list-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
}

/* ========================================
   DEPOIMENTO
   ======================================== */
.mve2-testimonial {
    padding: 30px;
    background: #1e293b;
    border-radius: 16px;
    text-align: center;
}

.mve2-testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
}

.mve2-testimonial-quote {
    font-size: 18px;
    font-style: italic;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 16px;
}

.mve2-testimonial-name {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

.mve2-testimonial-role {
    font-size: 14px;
    color: #94a3b8;
}

/* ========================================
   CARD
   ======================================== */
.mve2-card {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mve2-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mve2-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.mve2-card-content {
    padding: 24px;
}

.mve2-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 8px;
}

.mve2-card-text {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

/* ========================================
   PREÇO / PRICING
   ======================================== */
.mve2-pricing {
    background: #1e293b;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.mve2-pricing.featured {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
    border: 2px solid #8b5cf6;
}

.mve2-pricing-title {
    font-size: 20px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 8px;
}

.mve2-pricing-price {
    font-size: 48px;
    font-weight: 700;
    color: #8b5cf6;
    margin: 16px 0;
}

.mve2-pricing-currency {
    font-size: 24px;
    vertical-align: top;
}

.mve2-pricing-period {
    font-size: 16px;
    color: #94a3b8;
    font-weight: 400;
}

.mve2-pricing-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.mve2-pricing-feature {
    padding: 12px 0;
    color: #e2e8f0;
    border-bottom: 1px solid #334155;
}

.mve2-pricing-feature:last-child {
    border-bottom: none;
}

/* ========================================
   CONTADOR
   ======================================== */
.mve2-counter {
    text-align: center;
}

.mve2-counter-number {
    font-size: 48px;
    font-weight: 700;
    color: #8b5cf6;
    line-height: 1;
}

.mve2-counter-suffix {
    font-size: 36px;
}

.mve2-counter-title {
    font-size: 16px;
    color: #94a3b8;
    margin-top: 8px;
}

/* ========================================
   ÍCONES SOCIAIS
   ======================================== */
.mve2-social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mve2-social-icons.align-left { justify-content: flex-start; }
.mve2-social-icons.align-center { justify-content: center; }
.mve2-social-icons.align-right { justify-content: flex-end; }

.mve2-social-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #334155;
    color: #e2e8f0;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mve2-social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Cores específicas das redes */
.mve2-social-icon[data-network="facebook"]:hover { background: #1877f2; }
.mve2-social-icon[data-network="twitter"]:hover { background: #1da1f2; }
.mve2-social-icon[data-network="instagram"]:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.mve2-social-icon[data-network="linkedin"]:hover { background: #0a66c2; }
.mve2-social-icon[data-network="youtube"]:hover { background: #ff0000; }
.mve2-social-icon[data-network="whatsapp"]:hover { background: #25d366; }

/* ========================================
   DROP ZONES
   ======================================== */
.mve2-drop-zone {
    min-height: 60px;
    border: 2px dashed transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mve2-drop-zone.drag-over {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.mve2-drop-zone.drag-over::before {
    content: 'Solte aqui';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #8b5cf6;
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   RESPONSIVO DOS ELEMENTOS
   ======================================== */
@media (max-width: 768px) {
    .mve2-columns {
        flex-direction: column;
    }
    
    .mve2-column[data-width] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .mve2-heading[data-tag="h1"] { font-size: 32px; }
    .mve2-heading[data-tag="h2"] { font-size: 28px; }
    .mve2-heading[data-tag="h3"] { font-size: 24px; }
    
    .mve2-gallery[data-columns="4"],
    .mve2-gallery[data-columns="5"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mve2-pricing-price {
        font-size: 36px;
    }
    
    .mve2-counter-number {
        font-size: 36px;
    }
}
/* ========================================
   PRICING LAYOUTS
   ======================================== */

/* Pricing Carousel */
[data-mve2-element="pricing"][data-layout="carousel"] {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 #e0e0e0;
}

[data-mve2-element="pricing"][data-layout="carousel"]::-webkit-scrollbar {
    height: 8px;
}

[data-mve2-element="pricing"][data-layout="carousel"]::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

[data-mve2-element="pricing"][data-layout="carousel"]::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 4px;
}

[data-mve2-element="pricing"][data-layout="carousel"]::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

[data-mve2-element="pricing"][data-layout="carousel"] .pricing-card {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* Pricing Stacked */
[data-mve2-element="pricing"][data-layout="stacked"] {
    align-items: stretch;
}

[data-mve2-element="pricing"][data-layout="stacked"] .pricing-card {
    width: 100%;
    max-width: 600px;
}