/* pageNumbering.css */
.pagenumber-config-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.config-section {
    margin-bottom: 2rem;
}

.config-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: block;
}

/* ===== POSITION GRID - FIXED 3x3 SQUARE ===== */
.position-grid-container {
    display: block;
}

#page-number-grid-selector.position-grid {
    display: grid !important;
    grid-template-columns: 40px 40px 40px !important;
    grid-template-rows: 40px 40px 40px !important;
    width: 120px !important;
    height: 120px !important;
    /* border: 2px solid #e2e8f0 !important; */
    background: #f8fafc !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

#page-number-grid-selector .grid-cell {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border: 1px dashed #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

#page-number-grid-selector .grid-cell:hover {
    background: #f1f5f9 !important;
}

#page-number-grid-selector .grid-cell.active {
    background: #eff6ff !important;
    border-style: solid !important;
    border-color: #3b82f6 !important;
}

#page-number-grid-selector .grid-cell.active::after {
    content: "" !important;
    width: 14px !important;
    height: 14px !important;
    background: #3b82f6 !important;
    border-radius: 50% !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important;
}

/* ===== END POSITION GRID ===== */

/* Range & Standard Inputs */
.range-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.range-input-wrapper {
    display: flex;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s;
}

.range-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.range-label {
    padding: 0.6rem 0.9rem;
    background: #f8fafc;
    border-right: 1px solid #cbd5e1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.range-input-wrapper input {
    width: 80px;
    border: none;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    color: #1e293b;
    outline: none;
}

.pagenumber-select {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pagenumber-select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

hr {
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 640px) {
    .pagenumber-config-panel {
        padding: 1.25rem;
    }

    .range-group {
        gap: 0.75rem;
    }

    .range-input-wrapper input {
        width: 100%;
    }

    .range-input-wrapper {
        width: 100%;
    }
}