/* Admin Styles for Discko */

.discko-admin-wrap {
    max-width: 1200px;
    margin: 20px 0;
}

.discko-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Section Header with Number */
.discko-section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.discko-section-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #ff6b35;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin-top: 2px;
}

.discko-section-titles {
    flex: 1;
}

.discko-section h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.discko-section h3 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.discko-section-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

.discko-admin-header {
    background: #f5f5f5;
    border-left: 4px solid #6C5CE7;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.discko-admin-header p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.discko-settings-table {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
}

.discko-section-title {
    background: #fafafa;
    padding: 15px 10px !important;
    border-bottom: 2px solid #6C5CE7;
}

.discko-section-title h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.required {
    color: #d63638;
}

/* Icon Upload */
.discko-icon-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.discko-icon-preview {
    width: 80px;
    height: 80px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.discko-icon-preview img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
}

.discko-upload-icon-btn,
.discko-remove-icon-btn {
    margin-top: 0 !important;
}

/* Footer */
.discko-admin-footer {
    background: #e7f5ff;
    border-left: 4px solid #1e88e5;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.discko-admin-footer p {
    margin: 0;
    font-size: 13px;
    color: #333;
}

/* Mode Selection Cards */
.discko-mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.discko-mode-card {
    position: relative;
    border: none;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    display: block;
    overflow: visible;
}

.discko-mode-card:hover {
    transform: translateY(-2px);
}

.discko-mode-card:hover .discko-mode-preview,
.discko-mode-card:hover .discko-mode-info {
    border-color: #ff8c61;
}

.discko-mode-card.selected .discko-mode-preview,
.discko-mode-card.selected .discko-mode-info {
    border-color: #ff6b35;
    box-shadow: 0 2px 12px rgba(255, 107, 53, 0.12);
}

.discko-mode-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Preview Section */
.discko-mode-preview {
    background: #fff;
    padding: 24px;
    margin-bottom: 0;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    transition: all 0.3s ease;
}

.discko-preview-container {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.discko-preview-content {
    position: relative;
    min-height: 160px;
}

/* Skeleton Bars */
.discko-bar {
    background: linear-gradient(90deg, #f5f5f5 0%, #ececec 50%, #f5f5f5 100%);
    background-size: 200% 100%;
    animation: shimmer 2.5s ease-in-out infinite;
    border-radius: 4px;
    height: 8px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.discko-bar-small {
    width: 30px;
}

.discko-bar-medium {
    width: 60px;
}

.discko-bar-large {
    width: 100%;
    height: 12px;
    margin-bottom: 12px;
}

.discko-bar-title {
    width: 120px;
    height: 10px;
    margin-bottom: 12px;
}

.discko-bar-full {
    width: 100%;
    margin-bottom: 6px;
}

.discko-bar-85 {
    width: 85%;
    margin-bottom: 6px;
}

.discko-bar-80 {
    width: 80%;
    margin-bottom: 6px;
}

.discko-bar-75 {
    width: 75%;
    margin-bottom: 6px;
}

.discko-bar-input {
    width: 100%;
    height: 10px;
    margin-bottom: 8px;
}

.discko-bar-button {
    width: 80px;
    height: 12px;
    background: #ff6b35;
    border-radius: 6px;
    margin: 0 auto;
}

.discko-bar-button-small {
    width: 60px;
    height: 10px;
    background: #ff6b35;
    border-radius: 6px;
    margin-top: 8px;
}

/* Preview Header */
.discko-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.discko-preview-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Iframe Preview Specific */
.discko-iframe-preview {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
}

.discko-iframe-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #fff;
    padding: 0 6px;
    font-size: 10px;
    color: #666;
    font-weight: 500;
}

.discko-iframe-content {
    padding-top: 8px;
}

.discko-iframe-inputs {
    margin: 12px 0;
}

/* Button Mode Preview */
.discko-preview-main {
    margin-bottom: 16px;
    padding: 16px 0;
}

.discko-preview-lines {
    margin-top: 12px;
}

/* Floating Button Preview */
.discko-floating-btn-preview {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.discko-float-button {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c61 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    /* animation: float 2s ease-in-out infinite; REMOVED - no floating animation */
    flex-shrink: 0;
}

/* @keyframes float - REMOVED (no floating animation)
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}
*/

.discko-bubble-preview {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 140px;
    /* animation: fadeInBubble 2s ease-in-out infinite; REMOVED - no floating animation */
}

/* @keyframes fadeInBubble - REMOVED (no floating animation)
@keyframes fadeInBubble {
    0%, 100% {
        opacity: 0;
        transform: translateX(4px);
    }
    40%, 60% {
        opacity: 1;
        transform: translateX(0);
    }
}
*/

.discko-bubble-content {
    font-size: 9px;
}

.discko-bubble-arrow {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #fff;
}

/* Mode Info Section */
.discko-mode-info {
    padding: 24px;
    text-align: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    transition: all 0.3s ease;
}

.discko-mode-card.selected .discko-mode-info {
    background: #fffaf8;
}

.discko-mode-card.selected .discko-mode-preview {
    background: #fffaf8;
}

.discko-mode-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    border: none;
    padding: 0;
}

.discko-mode-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Info Box */
.discko-info-box {
    background: #e7f5ff;
    border-left: 4px solid #1e88e5;
    padding: 16px 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.discko-info-box h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
}

.discko-info-box ol {
    margin: 0;
    padding-left: 20px;
}

.discko-info-box li {
    margin-bottom: 8px;
    color: #333;
    font-size: 13px;
    line-height: 1.5;
}

.discko-info-box code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .discko-icon-upload {
        flex-direction: column;
        align-items: flex-start;
    }

    .discko-section-title h2 {
        font-size: 16px;
    }

    .discko-mode-cards {
        grid-template-columns: 1fr;
    }

    .discko-section {
        padding: 16px;
    }
}

/* ===========================
   Corner Selection Cards - 2x2 Grid
   =========================== */

.discko-corner-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 540px;
    margin: 8px 0;
}

.discko-corner-card {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.discko-corner-card:hover {
    border-color: #ff8c61;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.1);
}

.discko-corner-card.selected {
    border-color: #ff6b35;
    background: #fffaf8;
    box-shadow: 0 2px 12px rgba(255, 107, 53, 0.12);
}

.discko-corner-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.discko-corner-visual {
    width: 60px;
    height: 45px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    position: relative;
}

.discko-corner-dot {
    width: 10px;
    height: 10px;
    background: #666;
    border-radius: 50%;
    position: absolute;
    transition: all 0.3s ease;
}

.discko-corner-card.selected .discko-corner-dot {
    background: #ff6b35;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
}

/* Position dots based on corner */
.discko-corner-card[data-corner="top-left"] .discko-corner-dot {
    top: 6px;
    left: 6px;
}

.discko-corner-card[data-corner="top-middle"] .discko-corner-dot {
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.discko-corner-card[data-corner="top-right"] .discko-corner-dot {
    top: 6px;
    right: 6px;
}

.discko-corner-card[data-corner="bottom-left"] .discko-corner-dot {
    bottom: 6px;
    left: 6px;
}

.discko-corner-card[data-corner="bottom-middle"] .discko-corner-dot {
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.discko-corner-card[data-corner="bottom-right"] .discko-corner-dot {
    bottom: 6px;
    right: 6px;
}

.discko-corner-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.discko-corner-card.selected .discko-corner-label {
    color: #ff6b35;
    font-weight: 600;
}

/* ===========================
   Icon Upload Wrapper - Two Column Layout + Canvas Crop + Live Preview
   =========================== */

.discko-icon-upload-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.discko-icon-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.discko-icon-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Crop Controls */
.discko-crop-controls {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.discko-crop-label {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #333;
}

.discko-crop-canvas-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

#discko-crop-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.discko-crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.discko-crop-box {
    position: absolute;
    border: 2px solid #ff6b35;
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    cursor: move;
}

.discko-crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #ff6b35;
    border-radius: 50%;
    cursor: pointer;
}

.discko-handle-nw {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.discko-handle-ne {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.discko-handle-sw {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.discko-handle-se {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.discko-crop-actions {
    margin-top: 12px;
    text-align: center;
}

.discko-icon-help {
    font-size: 12px;
    color: #666;
}

/* Live Preview Section */
.discko-icon-live-preview {
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    position: relative;
}

.discko-preview-label {
    position: absolute;
    top: -10px;
    left: 16px;
    background: #fff;
    padding: 2px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}

.discko-preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 140px;
    padding: 20px;
}

.discko-preview-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.discko-preview-button:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.discko-preview-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.2), rgba(255, 107, 53, 0.4));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.discko-preview-button:hover::before {
    opacity: 1;
}

/* @keyframes float - REMOVED (duplicate, no floating animation)
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}
*/

.discko-preview-icon-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

#discko-preview-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.discko-preview-bubble {
    background: #6C5CE7;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.4;
    max-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.discko-preview-bubble::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-right: 6px solid #6C5CE7;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.discko-preview-note {
    text-align: center;
    font-size: 11px;
    color: #666;
    margin-top: 16px;
    margin-bottom: 0;
    font-style: italic;
}

/* Responsive - Mobile */
@media screen and (max-width: 782px) {
    .discko-icon-upload-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .discko-preview-stage {
        flex-direction: column;
    }

    .discko-preview-bubble {
        max-width: 100%;
    }

    .discko-preview-bubble::after {
        left: 50%;
        top: -6px;
        transform: translateX(-50%);
        border-right: 6px solid transparent;
        border-left: 6px solid transparent;
        border-bottom: 6px solid #6C5CE7;
        border-top: none;
    }
}

/* ============================================
   Hero Live Preview Section
   ============================================ */

.discko-hero-preview {
    background: linear-gradient(135deg, #fff 0%, #fffaf8 100%);
    border: 2px solid #ff6b35;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.discko-hero-preview h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.discko-preview-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px 0;
}

/* Preview Container - 1 seule preview centrée */
.discko-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    padding: 12px 0;
}

/* Preview Stage - contains button + bubble */
.discko-preview-stage {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Preview Button */
.discko-preview-button {
    position: relative;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Orange glow on hover */
.discko-preview-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.2), rgba(255, 107, 53, 0.4));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.discko-preview-button:hover::before {
    opacity: 1;
}

/* Canvas inside button */
.discko-preview-button canvas {
    border-radius: 50%;
}

/* Preview Bubble */
.discko-preview-bubble {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 200px;
    position: relative;
    color: #fff;
    transition: opacity 0.3s ease;
}

.discko-preview-bubble.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Bubble arrow - color dynamique via inline style */
.discko-preview-bubble::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
}

/* Arrow pointing left (bubble on right side) */
.discko-preview-bubble.arrow-left::after {
    left: -6px;
    border-width: 6px 6px 6px 0;
    /* border-color set via JS inline style */
}

/* Arrow pointing right (bubble on left side) */
.discko-preview-bubble.arrow-right::after {
    right: -6px;
    border-width: 6px 0 6px 6px;
    /* border-color set via JS inline style */
}

/* Animations - only on hover */
.discko-preview-button[data-animation="pulse"]:hover {
    animation: discko-pulse 0.8s ease-in-out;
}

.discko-preview-button[data-animation="scale"]:hover {
    transform: scale(1.1) rotate(5deg);
}

.discko-preview-button[data-animation="bounce"]:hover {
    animation: discko-bounce 0.6s;
}

@keyframes discko-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes discko-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* ============================================
   Section Rows (2 columns) & Full Width
   ============================================ */

.discko-section-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.discko-section-full {
    margin-bottom: 24px;
}

/* Crop Actions */
.discko-crop-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.discko-crop-loader {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #666;
    font-size: 13px;
}

.discko-crop-loader .spinner {
    float: none;
}

@media (max-width: 782px) {
    .discko-section-row {
        grid-template-columns: 1fr;
    }

    .discko-crop-actions {
        flex-direction: column;
    }
}

.discko-settings-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
}

.discko-settings-card h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 2px solid #ff6b35;
}

.discko-settings-card .form-table {
    margin: 0;
}

.discko-settings-card .form-table th {
    padding-left: 0;
    width: 180px;
}

.discko-settings-card .form-table td {
    padding-right: 0;
}

/* Icon upload section adjustments for new layout */
.discko-icon-upload-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
