/**
 * KINVA Phase Slider - Frontend Styles
 */

/* Container */
.kinva-ps-container {
    position: relative;
    /* Ensure absolute children (like notes panel) are positioned correctly */
    overflow: hidden;
    /* Hide notes panel when closed */
    font-family: Georgia, 'Times New Roman', serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #1a202c;
    /* Dark background */
    color: #edf2f7;
    /* Light text */
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    /* Stronger shadow for dark mode */
}

/* Title */
.kinva-ps-title {
    text-align: center;
    font-size: 24px;
    color: #edf2f7;
    /* Light text */
    margin: 0 0 20px 0;
    font-weight: normal;
    border-bottom: 1px solid #4a5568;
    /* Dark border */
    padding-bottom: 15px;
}

/* Error message */
.kinva-ps-error {
    color: #d63638;
    background: #fcf0f1;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* Image wrapper */
.kinva-ps-image-wrapper {
    position: relative;
    width: 100%;
    /* aspect-ratio lesz inline style-ból beállítva */
    max-height: 500px;
    margin: 0 auto 25px;
    border-radius: 8px;
    overflow: hidden;
    background: #2d3748;
    /* Darker placeholder background */
}

/* Tájolás beállítások */
.kinva-ps-orientation-portrait .kinva-ps-image-wrapper {
    aspect-ratio: 5 / 7 !important;
    max-height: 500px;
    max-width: 358px;
}

.kinva-ps-orientation-landscape .kinva-ps-image-wrapper {
    aspect-ratio: 16 / 9 !important;
    max-height: 450px;
}

.kinva-ps-orientation-square .kinva-ps-image-wrapper {
    aspect-ratio: 1 / 1 !important;
    max-height: 500px;
    max-width: 500px;
}

/* Phase images */
.kinva-ps-phase-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.kinva-ps-phase-image.active {
    opacity: 1;
    pointer-events: auto;
}

.kinva-ps-phase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder */
.kinva-ps-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 20px;
}

.kinva-ps-placeholder-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.kinva-ps-placeholder-text {
    font-size: 18px;
    font-weight: 600;
}

/* Phase label (top left) */
.kinva-ps-phase-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10;
    backdrop-filter: blur(10px);
}

/* Description box (bottom) */
.kinva-ps-description-box {
    position: relative;
    margin-bottom: 25px;
    padding: 20px;
    min-height: 80px;
    background: #2d3748;
    /* Dark secondary background */
    border: 1px solid #4a5568;
    /* Dark border */
    border-radius: 8px;
    transition: all 0.3s ease;
}

.kinva-ps-description {
    background: transparent;
    color: #e2e8f0;
    /* Light gray text */
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    display: none;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kinva-ps-description.active {
    display: block;
}

.kinva-ps-description strong {
    color: #63b3ed;
    /* Light blue accent */
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

/* Controls */
.kinva-ps-controls {
    position: relative;
    padding: 0 20px;
    margin-bottom: 20px;
}

/* Track */
.kinva-ps-track {
    position: relative;
    height: 50px;
}



.kinva-ps-track-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #4a5568;
    /* Dark track line */
    border-radius: 2px;
    transform: translateY(-50%);
}

.kinva-ps-track-progress {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #4299e1 0%, #63b3ed 100%);
    /* Lighter blue gradient */
    border-radius: 2px;
    transform: translateY(-50%);
    transition: width 0.3s ease;
}

/* Dots */
.kinva-ps-dots {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.kinva-ps-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4a5568;
    /* Dark dot */
    border: 3px solid #2d3748;
    /* Dark border matching description box */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 5;
}

.kinva-ps-dot:hover {
    transform: scale(1.2);
    background: #a0aec0;
}

.kinva-ps-dot.active {
    background: #4299e1;
    /* Active blue */
    transform: scale(1.25);
    border-color: #1a202c;
    /* Match container bg */
}

.kinva-ps-dot.passed {
    background: #2b6cb0;
    /* Passed state */
}

/* Range input */
/* Range input - Visually Hidden */
.kinva-ps-range {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 40px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    /* Hide completely */
}

.kinva-ps-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.kinva-ps-range::-moz-range-thumb {
    width: 0;
    height: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* Labels */
.kinva-ps-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 10px;
}

.kinva-ps-label {
    text-align: center;
    cursor: pointer;
    transition: color 0.3s ease;
    flex: 1;
}

.kinva-ps-label-title {
    display: block;
    font-size: 13px;
    color: #a0aec0;
    /* Muted text */
    font-weight: 600;
}

.kinva-ps-label-subtitle {
    display: block;
    font-size: 11px;
    color: #718096;
    /* Darker muted text */
    margin-top: 4px;
    line-height: 1.4;
}

.kinva-ps-label:hover .kinva-ps-label-title {
    color: #edf2f7;
    /* White text on hover */
}

.kinva-ps-label.active .kinva-ps-label-title {
    color: #63b3ed;
    /* Active blue */
}

.kinva-ps-label.active .kinva-ps-label-subtitle {
    color: #a0aec0;
}

/* Quote */
.kinva-ps-quote {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 10px;
    margin-top: 20px;
}

.kinva-ps-quote-text {
    font-size: 18px;
    font-style: italic;
    color: #4a5568;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.kinva-ps-quote-author {
    font-size: 14px;
    color: #718096;
}

/* Responsive */
@media (max-width: 600px) {
    .kinva-ps-container {
        padding: 15px;
        border-radius: 8px;
    }

    .kinva-ps-image-wrapper {
        max-height: 350px;
    }

    .kinva-ps-orientation-portrait .kinva-ps-image-wrapper {
        aspect-ratio: 4 / 5;
    }

    .kinva-ps-orientation-landscape .kinva-ps-image-wrapper {
        aspect-ratio: 16 / 9;
        max-height: 250px;
    }

    .kinva-ps-orientation-square .kinva-ps-image-wrapper {
        aspect-ratio: 1 / 1;
        max-height: 350px;
    }

    .kinva-ps-phase-label {
        font-size: 12px;
        padding: 6px 12px;
        top: 10px;
        left: 10px;
    }

    .kinva-ps-description {
        font-size: 13px;
        padding: 5px;
    }

    .kinva-ps-controls {
        padding: 0 10px;
    }

    .kinva-ps-labels {
        flex-wrap: wrap;
        gap: 5px;
    }

    .kinva-ps-label {
        flex: 0 0 auto;
        min-width: 0;
    }

    .kinva-ps-label-title {
        font-size: 11px;
    }

    .kinva-ps-label-subtitle {
        display: none;
    }

    .kinva-ps-quote-text {
        font-size: 16px;
    }
}

/* Touch device improvements */
@media (hover: none) {
    .kinva-ps-dot:hover {
        transform: none;
    }

    .kinva-ps-range::-webkit-slider-thumb {
        width: 36px;
        height: 36px;
    }

    .kinva-ps-range::-moz-range-thumb {
        width: 36px;
        height: 36px;
    }
}

/* Dark mode support (Already Default Now) */
@media (prefers-color-scheme: light) {
    /* Optional: Add light mode override here if requested later */
}

/* ==============================================
   ANYAGLISTA GOMB ÉS MODAL
   ============================================== */

/* Gomb */
.kinva-ps-materials-section {
    margin-top: 20px;
    text-align: center;
}

.kinva-ps-materials-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.kinva-ps-materials-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.kinva-ps-materials-icon {
    font-size: 18px;
}

/* Modal */
.kinva-ps-materials-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.kinva-ps-materials-modal.open {
    opacity: 1;
    visibility: visible;
}

.kinva-ps-materials-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.kinva-ps-materials-modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: #1a202c;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.kinva-ps-materials-modal.open .kinva-ps-materials-modal-content {
    transform: scale(1) translateY(0);
}

.kinva-ps-materials-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #2d3748;
}

.kinva-ps-materials-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #edf2f7;
    font-weight: 600;
}

.kinva-ps-materials-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #718096;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.kinva-ps-materials-modal-close:hover {
    color: #e53e3e;
}

.kinva-ps-materials-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
}

.kinva-ps-materials-category {
    margin-bottom: 20px;
}

.kinva-ps-materials-category:last-child {
    margin-bottom: 0;
}

.kinva-ps-materials-category h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #63b3ed;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kinva-ps-materials-cat-icon {
    font-size: 16px;
}

.kinva-ps-materials-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kinva-ps-materials-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #2d3748;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.kinva-ps-materials-items li:hover {
    background: #3d4a5c;
}

.kinva-ps-materials-items li:last-child {
    margin-bottom: 0;
}

.kinva-ps-material-item-name {
    color: #e2e8f0;
    font-size: 14px;
}

.kinva-ps-material-item-qty {
    color: #a0aec0;
    font-size: 13px;
    font-style: italic;
}

.kinva-ps-materials-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #2d3748;
    text-align: center;
}

.kinva-ps-materials-print {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2d3748;
    color: #e2e8f0;
    border: 1px solid #4a5568;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kinva-ps-materials-print:hover {
    background: #3d4a5c;
    border-color: #63b3ed;
}

/* Modal responsive */
@media (max-width: 600px) {
    .kinva-ps-materials-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .kinva-ps-materials-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
}

/* Print styles - not needed for materials (handled by JS new window) */
/* Keep empty for potential future use */

/* ==============================================
   LIGHTBOX / ZOOM
   ============================================== */


/* Lightbox Modal */
.kinva-ps-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.kinva-ps-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.kinva-ps-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.kinva-ps-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Close button */
.kinva-ps-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.kinva-ps-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Image container */
.kinva-ps-lightbox-image-container {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.kinva-ps-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    cursor: grab;
}

.kinva-ps-lightbox-image.dragging {
    cursor: grabbing;
}

/* Zoom controls */
.kinva-ps-lightbox-zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    border-radius: 25px;
    backdrop-filter: blur(4px);
}

.kinva-ps-lightbox-zoom-out,
.kinva-ps-lightbox-zoom-in {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.kinva-ps-lightbox-zoom-out:hover,
.kinva-ps-lightbox-zoom-in:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Divider between zoom and download */
.kinva-ps-lightbox-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 5px;
}

/* Download button */
.kinva-ps-lightbox-download {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 20px;
    color: #fff;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.kinva-ps-lightbox-download span {
    font-size: 14px;
}

.kinva-ps-lightbox-download:hover {
    background: rgba(255, 255, 255, 0.3);
}

.kinva-ps-lightbox-zoom-level {
    color: #fff;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
}

/* Navigation arrows */
.kinva-ps-lightbox-prev,
.kinva-ps-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.kinva-ps-lightbox-prev svg,
.kinva-ps-lightbox-next svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2.5;
}

.kinva-ps-lightbox-prev {
    left: 20px;
}

.kinva-ps-lightbox-next {
    right: 20px;
}

/* Arrow icon text */
.kinva-ps-nav-arrow {
    font-size: 24px;
    color: #fff;
    line-height: 1;
}

.kinva-ps-lightbox-prev:hover,
.kinva-ps-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* Phase info - positioned at top */
.kinva-ps-lightbox-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(4px);
}

.kinva-ps-lightbox-phase-num {
    display: block;
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.kinva-ps-lightbox-phase-title {
    display: block;
    font-size: 18px;
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 768px) {

    .kinva-ps-lightbox-prev,
    .kinva-ps-lightbox-next {
        width: 40px;
        height: 40px;
    }

    .kinva-ps-lightbox-prev {
        left: 10px;
    }

    .kinva-ps-lightbox-next {
        right: 10px;
    }

    .kinva-ps-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .kinva-ps-lightbox-zoom-controls {
        bottom: 10px;
    }

    .kinva-ps-lightbox-info {
        bottom: 60px;
    }
}

/* ==============================================
   GRID OVERLAY
   ============================================== */

/* Toolbar container - takes full space but invisible */
.kinva-ps-toolbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    pointer-events: none;
    z-index: 10;
}

/* Toolbar buttons - base styles */
.kinva-ps-toolbar button {
    position: absolute;
    bottom: 15px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    font-family: inherit;
    white-space: nowrap;
    pointer-events: auto;
}

/* Grid button - left bottom corner */
.kinva-ps-grid-trigger {
    left: 15px;
}

/* Zoom button - right bottom corner */
.kinva-ps-zoom-trigger {
    right: 15px;
}

.kinva-ps-toolbar button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.02);
}

.kinva-ps-toolbar button.active {
    background: rgba(59, 130, 246, 0.8);
}

.kinva-ps-btn-icon {
    font-size: 18px;
    line-height: 1;
}

.kinva-ps-btn-text {
    font-size: 14px;
    font-weight: 500;
}

/* Grayscale effect - applied via inline style from JS */
.kinva-ps-image-wrapper img {
    transition: filter 0.3s ease;
}

/* Grid overlay */
.kinva-ps-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kinva-ps-grid-overlay.visible {
    opacity: 1;
}

.kinva-ps-grid-overlay svg {
    width: 100%;
    height: 100%;
}

/* Grid settings panel */
.kinva-ps-grid-settings {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    width: 280px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.kinva-ps-grid-settings.open {
    opacity: 1;
    visibility: visible;
}

.kinva-ps-grid-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.kinva-ps-grid-settings-header:active {
    cursor: grabbing;
}

.kinva-ps-grid-settings-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}

.kinva-ps-grid-settings-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
}

.kinva-ps-grid-settings-close:hover {
    opacity: 1;
}

.kinva-ps-grid-settings-body {
    padding: 15px;
}

.kinva-ps-grid-field {
    margin-bottom: 15px;
}

.kinva-ps-grid-field label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.kinva-ps-grid-field input[type="number"] {
    width: 70px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    text-align: center;
}

.kinva-ps-grid-field input[type="number"]:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.8);
}

.kinva-ps-grid-size-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kinva-ps-grid-size-inputs span {
    color: rgba(255, 255, 255, 0.5);
}

/* Grid type selector */
.kinva-ps-grid-type {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.kinva-ps-grid-type option {
    background: #1a202c;
    color: #fff;
}

/* Hide custom grid fields when not in custom mode */
.kinva-ps-custom-grid-only.hidden {
    display: none;
}

/* Grayscale slider */
.kinva-ps-grayscale-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #3b82f6 0%, #718096 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.kinva-ps-grayscale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #718096;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.kinva-ps-grayscale-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.kinva-ps-grayscale-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #718096;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.kinva-ps-grayscale-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.kinva-ps-grayscale-value {
    color: #718096;
    font-weight: 600;
    font-size: 12px;
    margin-left: 5px;
}

/* Color picker */
.kinva-ps-grid-color-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kinva-ps-grid-color {
    width: 60px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    padding: 2px;
}

.kinva-ps-grid-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.kinva-ps-grid-color::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.kinva-ps-grid-color::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.kinva-ps-grid-color-hex {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-family: monospace;
    letter-spacing: 0.5px;
}

/* Opacity slider */
.kinva-ps-grid-opacity {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 1) 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.kinva-ps-grid-opacity::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.kinva-ps-grid-opacity::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.kinva-ps-grid-opacity::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.kinva-ps-grid-opacity::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.kinva-ps-grid-opacity-value {
    color: #3b82f6;
    font-weight: 600;
    font-size: 12px;
    margin-left: 5px;
}

/* Corner selection */
.kinva-ps-grid-corners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.kinva-ps-grid-corners label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.kinva-ps-grid-corners label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.kinva-ps-grid-corners input[type="radio"] {
    accent-color: #3b82f6;
}

/* Grid action buttons */
.kinva-ps-grid-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.kinva-ps-grid-apply {
    flex: 1;
    padding: 10px;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.kinva-ps-grid-apply:hover {
    background: #2563eb;
}

.kinva-ps-grid-hide {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.kinva-ps-grid-hide:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Grid download button */
.kinva-ps-grid-download {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.kinva-ps-grid-download-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.kinva-ps-grid-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.kinva-ps-grid-download-btn span {
    font-size: 18px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .kinva-ps-grid-settings {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
        top: 10px;
        transform: none;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }

    .kinva-ps-grid-settings-header {
        cursor: default;
    }

    .kinva-ps-toolbar button {
        padding: 8px 12px;
        bottom: 10px;
    }

    .kinva-ps-grid-trigger {
        left: 10px;
    }

    .kinva-ps-zoom-trigger {
        right: 10px;
    }

    .kinva-ps-btn-text {
        display: none;
    }

    .kinva-ps-grid-color-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}