/* EcomNestWeb Product Designer Frontend Styles */
.enw-pd-designer-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.enw-pd-designer-title {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.enw-pd-canvas-wrap {
    margin-bottom: 20px;
}

.enw-pd-canvas-stage {
    min-height: 240px;
    height: 280px;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.enw-pd-template-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.enw-pd-template-layer svg {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
}

.enw-pd-text-layer {
    position: relative;
    z-index: 2;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
    padding: 0 20px;
    user-select: none;
    transition: all 0.15s ease-out;
}

.enw-pd-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.enw-pd-control-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.enw-pd-input-text {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.enw-pd-input-text:focus {
    border-color: #0284c7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.enw-pd-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    box-sizing: border-box;
}

.enw-pd-label-val {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.enw-pd-slider {
    width: 100%;
    accent-color: #0284c7;
    cursor: pointer;
}

.enw-pd-color-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.enw-pd-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #cbd5e1;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0;
}

.enw-pd-swatch.active, .enw-pd-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #0284c7, 0 4px 6px rgba(0,0,0,0.1);
}

.enw-pd-template-swatches {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.enw-pd-tpl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    min-width: 70px;
    transition: all 0.2s;
}

.enw-pd-tpl-btn.active, .enw-pd-tpl-btn:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

.enw-pd-tpl-thumb {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enw-pd-tpl-thumb svg {
    max-width: 100%;
    max-height: 100%;
}

.enw-pd-actions-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.enw-pd-btn-buynow {
    flex: 1;
    background-color: #0f172a !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.enw-pd-btn-buynow:hover {
    background-color: #1e293b !important;
}

.enw-pd-btn-whatsapp {
    flex: 1;
    background-color: #25D366 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.enw-pd-btn-whatsapp:hover {
    background-color: #1ebd56 !important;
}

/* VIDEO DIRECTION & TUTORIAL MODAL STYLES */
.enw-pd-video-direction-bar {
    margin-bottom: 16px;
}

.enw-pd-video-modal-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.enw-pd-video-modal-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.enw-pd-video-modal-trigger .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* MODAL OVERLAY */
.enw-pd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.enw-pd-video-modal-container {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: enwPdModalFade 0.25s ease-out forwards;
}

@keyframes enwPdModalFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.enw-pd-video-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(15, 23, 42, 0.08);
    border: none;
    font-size: 24px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.enw-pd-video-modal-close:hover {
    background: #ef4444;
    color: #ffffff;
}

.enw-pd-video-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.enw-pd-video-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    padding-right: 40px;
}

.enw-pd-video-modal-body {
    padding: 0;
    background: #000000;
}

.enw-pd-video-aspect-ratio {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.enw-pd-video-aspect-ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
