.pdt-notice-spaced {
  margin: 20px 0;
}
/* Polanger Dashboard Tools - Modern Admin UI */

:root {
    --pdt-primary: #3858e9;
    --pdt-primary-hover: #2945c4;
    --pdt-success: #00a32a;
    --pdt-danger: #d63638;
    --pdt-warning: #dba617;
    --pdt-text: #1e1e1e;
    --pdt-text-light: #646970;
    --pdt-border: #e0e0e0;
    --pdt-bg: #ffffff;
    --pdt-bg-hover: #f8f9fa;
    --pdt-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --pdt-radius: 12px;
    --pdt-radius-sm: 8px;
    --pdt-transition: all 0.2s ease;
}

#pdt-wrap {
    position: relative;
    margin: 20px 20px 20px 0;
    padding: 0;
    max-width: 1200px;
    border-radius: var(--pdt-radius);
    border: none;
    box-shadow: var(--pdt-shadow);
    background: var(--pdt-bg);
    overflow: visible;
}

/* Tab Navigation */
.pdt-tabs-nav {
    display: flex;
    gap: 0;
    background: #f8f9fa;
    border-bottom: 1px solid var(--pdt-border);
    padding: 0;
}

.pdt-tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--pdt-text-light);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: var(--pdt-transition);
    margin-bottom: -1px;
}

.pdt-tab-link:hover {
    color: var(--pdt-text);
    background: #fff;
}

.pdt-tab-link.active {
    color: var(--pdt-primary);
    background: #fff;
    border-bottom-color: var(--pdt-primary);
}

.pdt-tab-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.pdt-tab-content {
    padding: 0;
}

#pdt-wrap .pdt-header {
    background: linear-gradient(135deg, var(--pdt-primary) 0%, #6366f1 100%);
    padding: 12px 12px;
    color: #fff;
}

.pdt-title {
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #fff !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdt-title:before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "dashicons";
    content: "\f203";
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 20px;
}

.pdt-subtitle {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
    color: #fff !important;
}

#pdt-wrap .pdt-header p {
    color: #fff !important;
}

#pdt-wrap form {
    padding: 24px 32px 32px;
}

/* Override WordPress Settings API form-table layout */
#pdt-wrap > form > table.form-table {
    display: block;
    width: 100%;
    margin: 0;
}

#pdt-wrap > form > table.form-table > tbody {
    display: block;
}

#pdt-wrap > form > table.form-table > tbody > tr {
    display: block;
    margin-bottom: 0;
}

#pdt-wrap > form > table.form-table > tbody > tr > th {
    display: block;
    width: 100%;
    padding: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--pdt-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#pdt-wrap > form > table.form-table > tbody > tr > td {
    display: block;
    width: 100%;
    padding: 0;
}

/* Hide the section title from WordPress - we use our own header */
#pdt-wrap h2:not(.pdt-title) {
    display: none;
}

/* Buttons container */
.pdt-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.pdt-buttons .submit {
    margin: 0;
    padding: 0;
}

#pdt-wrap #submit {
    height: 48px;
    padding: 0 32px;
    font-size: 14px;
    font-weight: 600;
    background: var(--pdt-primary);
    border: none;
    border-radius: var(--pdt-radius-sm);
    color: #fff;
    cursor: pointer;
    transition: var(--pdt-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#pdt-wrap #submit:hover {
    background: var(--pdt-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 88, 233, 0.3);
}

/* Reset button - subtle, right aligned */
.pdt-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 400;
    color: var(--pdt-text-light);
    background: transparent;
    border: 1px solid var(--pdt-border);
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--pdt-transition);
    opacity: 0.7;
}

.pdt-reset-btn:hover {
    opacity: 1;
    border-color: var(--pdt-danger);
    color: var(--pdt-danger);
    background: #fff5f5;
}

.pdt-reset-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Notice messages */
.pdt-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    margin: 0 0 20px 0;
    border-radius: var(--pdt-radius-sm);
    font-weight: 500;
    clear: both;
    width: 100%;
    box-sizing: border-box;
}

.pdt-notice-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border-left: 4px solid var(--pdt-success);
}

.pdt-notice-success .dashicons {
    color: var(--pdt-success);
    font-size: 20px;
}

#pdt-list .pdt-status {
    color: var(--pdt-text-light);
    font-size: 18px;
    transition: var(--pdt-transition);
}

#pdt-list .pdt-status.dashicons-hidden {
    color: var(--pdt-danger);
}

#pdt-list .pdt-status.dashicons-visibility {
    color: var(--pdt-success);
}

.pdt-summary {
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f4f8 100%);
    border-radius: var(--pdt-radius-sm);
    font-weight: 500;
    color: var(--pdt-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdt-summary .pdt-count {
    font-weight: 700;
    color: var(--pdt-primary);
    font-size: 18px;
}

/* Legend / Help section */
.pdt-legend {
    margin-top: 20px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: var(--pdt-radius-sm);
    border: 1px solid var(--pdt-border);
}

.pdt-legend-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--pdt-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdt-legend-title .dashicons {
    font-size: 16px;
    color: var(--pdt-text-light);
}

.pdt-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.pdt-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pdt-text-light);
}

.pdt-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
}

.pdt-legend-color.hidden {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-left: 3px solid var(--pdt-danger);
}

.pdt-legend-color.has-hidden {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 3px solid var(--pdt-warning);
}

.pdt-legend-color.normal {
    background: #fff;
}

.pdt-legend-color.renamed {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border-left: 3px solid var(--pdt-primary);
}

/* Table styles */
.pdt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    border: 1px solid var(--pdt-border);
    border-radius: var(--pdt-radius-sm);
    overflow: visible;
}

/* Border radius for first and last rows */
.pdt-table thead tr:first-child th:first-child {
    border-top-left-radius: var(--pdt-radius-sm);
}
.pdt-table thead tr:first-child th:last-child {
    border-top-right-radius: var(--pdt-radius-sm);
}
.pdt-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--pdt-radius-sm);
}
.pdt-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--pdt-radius-sm);
}

.pdt-table th,
.pdt-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--pdt-border);
}

.pdt-table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pdt-text-light);
    background: #f8f9fa;
}

.pdt-table tbody {
    overflow: visible;
}

.pdt-table tbody tr {
    transition: var(--pdt-transition);
    overflow: visible;
}

.pdt-table tbody tr:last-child td {
    border-bottom: none;
}

.pdt-table tbody tr:hover {
    background: var(--pdt-bg-hover);
}

.pdt-table td.pdt-center {
    text-align: center;
    width: 70px;
}

/* PRO: Hide selector */
.pdt-table td.pdt-hide-cell {
    width: 80px;
    text-align: center;
    position: relative;
    overflow: visible;
}

.pdt-hide-selector {
    position: relative;
    display: inline-block;
}

.pdt-hide-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #fff;
    border: 2px solid var(--pdt-border);
    border-radius: var(--pdt-radius-sm);
    cursor: pointer;
    transition: var(--pdt-transition);
}

.pdt-hide-toggle:hover {
    border-color: var(--pdt-primary);
    background: var(--pdt-bg-hover);
}

.pdt-hide-toggle.is-hidden {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-color: var(--pdt-danger);
}

.pdt-hide-toggle .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--pdt-success);
}

.pdt-hide-toggle.is-hidden .dashicons {
    color: var(--pdt-danger);
}

.pdt-hide-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999999;
    min-width: 280px;
    background: #fff;
    border: 1px solid var(--pdt-border);
    border-radius: var(--pdt-radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: none;
    margin-top: 4px;
}

.pdt-hide-selector.open .pdt-hide-dropdown {
    display: block;
}

.pdt-hide-dropdown-header {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pdt-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--pdt-border);
    background: #f8f9fa;
    border-radius: var(--pdt-radius-sm) var(--pdt-radius-sm) 0 0;
}

.pdt-hide-options {
    padding: 8px 0;
}

/* Hide from everyone option */
.pdt-hide-all-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: var(--pdt-transition);
    border-bottom: 1px solid var(--pdt-border);
    background: #fff;
}

.pdt-hide-all-option:hover {
    background: #fff5f5;
}

.pdt-hide-all-option.active {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.pdt-hide-all-option .dashicons {
    color: var(--pdt-danger);
    font-size: 18px;
}

.pdt-hide-all-option input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    margin: 0 !important;
}

.pdt-hide-all-option span:last-child {
    font-size: 13px;
    font-weight: 600;
    color: var(--pdt-danger);
}

/* Hide from specific users section */
.pdt-hide-users-section {
    padding: 8px 0;
}

.pdt-hide-users-section.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pdt-hide-users-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pdt-text-light);
}

.pdt-hide-users-header .dashicons {
    font-size: 16px;
    color: var(--pdt-primary);
}

.pdt-hide-users-list {
    max-height: 200px;
    overflow-y: auto;
}

.pdt-hide-users-search-wrap {
    padding: 0 14px 8px;
}

.pdt-hide-users-search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--pdt-border);
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
}

.pdt-hide-users-search:focus {
    outline: none;
    border-color: var(--pdt-primary);
    box-shadow: 0 0 0 2px rgba(56, 88, 233, 0.12);
}

.pdt-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: var(--pdt-transition);
}

.pdt-user-item:hover {
    background: var(--pdt-bg-hover);
}

.pdt-user-item input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    margin: 0 !important;
}

.pdt-user-item span {
    font-size: 13px;
    color: var(--pdt-text);
}

/* PRO: Block option styles */
.pdt-option-group {
    border-bottom: 1px solid var(--pdt-border);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.pdt-option-group.active {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.pdt-block-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 28px;
    cursor: pointer;
    transition: var(--pdt-transition);
    font-size: 12px;
    background: #f8f9fa;
    margin: 4px 8px;
    border-radius: var(--pdt-radius-sm);
    border: 1px dashed var(--pdt-border);
}

.pdt-block-option:hover:not(.disabled) {
    background: #fff3cd;
    border-color: #ffc107;
}

.pdt-block-option.active {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-color: #ffc107;
    border-style: solid;
}

.pdt-block-option.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pdt-block-option .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #856404;
}

.pdt-block-option input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    margin: 0 !important;
}

.pdt-block-option span:last-child {
    font-size: 12px;
    color: #856404;
    font-weight: 500;
}

/* User item row with block toggle */
.pdt-user-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    transition: var(--pdt-transition);
}

.pdt-user-item-row:hover {
    background: var(--pdt-bg-hover);
}

.pdt-user-item-row.pdt-user-row-hidden {
    display: none;
}

.pdt-user-item-row .pdt-user-item {
    flex: 1;
    padding: 0;
}

.pdt-user-item-row .pdt-user-item:hover {
    background: transparent;
}

.pdt-block-user-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--pdt-transition);
    background: #f8f9fa;
    border: 1px solid var(--pdt-border);
}

.pdt-block-user-toggle:hover:not(.disabled) {
    background: #fff3cd;
    border-color: #ffc107;
}

.pdt-block-user-toggle.active {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-color: #ffc107;
}

.pdt-block-user-toggle.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.pdt-block-user-toggle .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #856404;
}

.pdt-block-user-toggle input[type="checkbox"] {
    display: none;
}

.pdt-user-search-empty {
    display: none;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--pdt-text-light);
}

.pdt-user-search-empty.is-visible {
    display: block;
}

/* Block badge on toggle button */
.pdt-block-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 10px;
    line-height: 1;
}

.pdt-hide-toggle {
    position: relative;
}

.pdt-hide-toggle.is-blocked {
    border-color: #ffc107;
}

/* PRO: Drag and drop styles */
.pdt-drag-header {
    width: 40px;
}

.pdt-drag-cell {
    width: 40px;
    text-align: center;
    vertical-align: middle;
}

.pdt-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: grab;
    color: #999;
    border-radius: 4px;
    transition: var(--pdt-transition);
}

.pdt-drag-handle:hover {
    background: var(--pdt-bg-hover);
    color: var(--pdt-primary);
}

.pdt-drag-handle:active {
    cursor: grabbing;
}

.pdt-drag-handle .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.pdt-submenu-drag .pdt-drag-handle {
    width: 24px;
    height: 24px;
}

.pdt-submenu-drag .pdt-drag-handle .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Sortable placeholder */
.pdt-table tbody tr.ui-sortable-placeholder {
    visibility: visible !important;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border: 2px dashed var(--pdt-primary) !important;
}

.pdt-table tbody tr.ui-sortable-helper {
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: var(--pdt-radius-sm);
}

/* Submenu sortable */
.pdt-submenu-row.ui-sortable-placeholder {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%) !important;
    border: 2px dashed #ff9800 !important;
}

/* Slug hint */
.pdt-slug-hint {
    font-size: 11px;
    color: #999;
    font-weight: normal;
    margin-left: 4px;
}

.pdt-table td label {
    font-weight: 500;
    color: var(--pdt-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Custom checkbox */
.pdt-table input[type="checkbox"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border: 2px solid var(--pdt-border) !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: var(--pdt-transition);
    position: relative;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.pdt-table input[type="checkbox"]:hover {
    border-color: var(--pdt-primary) !important;
}

.pdt-table input[type="checkbox"]:checked {
    background: var(--pdt-danger) !important;
    border-color: var(--pdt-danger) !important;
}

.pdt-table input[type="checkbox"]:checked::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    top: 3px;
    left: 6px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pdt-table input[type="checkbox"]::after {
    display: none !important;
}

/* Rename input */
.pdt-rename-input {
    width: 100%;
    max-width: 350px;
    padding: 10px 14px;
    border: 2px solid var(--pdt-border);
    border-radius: var(--pdt-radius-sm);
    font-size: 14px;
    color: var(--pdt-text);
    transition: var(--pdt-transition);
    background: #fff;
}

.pdt-rename-input::placeholder {
    color: #a0a5aa;
}

.pdt-rename-input:hover {
    border-color: #c0c4c8;
}

.pdt-rename-input:focus {
    border-color: var(--pdt-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.15);
}

/* Section title */
.pdt-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--pdt-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* Menu rows - allow dropdown overflow */
.pdt-menu-row,
.pdt-submenu-row {
    overflow: visible;
}

.pdt-menu-row td,
.pdt-submenu-row td {
    overflow: visible;
}

/* Hidden menu rows */
.pdt-menu-row.is-hidden,
.pdt-submenu-row.is-hidden {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.pdt-menu-row.is-hidden td:first-child {
    border-left: 3px solid var(--pdt-danger);
}

/* Menu with hidden submenus */
.pdt-menu-row.has-hidden-submenu {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.pdt-menu-row.has-hidden-submenu td:first-child {
    border-left: 3px solid var(--pdt-warning);
}

/* Menu with renamed submenus (but not hidden) */
.pdt-menu-row.has-renamed-submenu {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
}

.pdt-menu-row.has-renamed-submenu td:first-child {
    border-left: 3px solid var(--pdt-primary);
}

/* Both hidden and has hidden submenu */
.pdt-menu-row.is-hidden.has-hidden-submenu {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.pdt-menu-row.is-hidden.has-hidden-submenu td:first-child {
    border-left: 3px solid var(--pdt-danger);
}

/* Renamed menu rows */
.pdt-menu-row.is-renamed,
.pdt-submenu-row.is-renamed {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
}

.pdt-menu-row.is-renamed td:first-child,
.pdt-submenu-row.is-renamed td:first-child {
    border-left: 3px solid var(--pdt-primary);
}

/* Priority: hidden > renamed */
.pdt-menu-row.is-hidden.is-renamed,
.pdt-submenu-row.is-hidden.is-renamed {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.pdt-menu-row.is-hidden.is-renamed td:first-child,
.pdt-submenu-row.is-hidden.is-renamed td:first-child {
    border-left: 3px solid var(--pdt-danger);
}

/* Submenu rows */
.pdt-submenu-row {
    background: #fafafa;
}

.pdt-submenu-row.is-hidden {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.pdt-submenu-row.is-hidden td:first-child {
    border-left: 3px solid var(--pdt-danger);
    padding-left: 23px !important;
}

.pdt-submenu-row td {
    padding-left: 20px !important;
}

.pdt-submenu-indicator {
    color: var(--pdt-text-light);
    font-size: 14px;
    margin-right: 5px;
}

.pdt-menu-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.pdt-submenu-toggle {
    font-size: 16px;
    color: var(--pdt-text-light);
    cursor: pointer;
    transition: var(--pdt-transition);
}

.pdt-submenu-toggle.open {
    transform: rotate(180deg);
}

/* Icon picker */
.pdt-icon-cell {
    width: 80px;
}

.pdt-icon-picker {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdt-current-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    color: var(--pdt-text);
}

.pdt-icon-btn {
    background: none;
    border: 1px solid var(--pdt-border);
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    transition: var(--pdt-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdt-icon-btn:hover {
    border-color: var(--pdt-primary);
    background: var(--pdt-bg-hover);
}

.pdt-icon-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: var(--pdt-text-light);
}

/* Hidden utility class */
.pdt-hidden {
    display: none !important;
}

/* Modal */
.pdt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdt-modal-content {
    background: #fff;
    border-radius: var(--pdt-radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pdt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--pdt-border);
    background: #f8f9fa;
}

.pdt-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pdt-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--pdt-text-light);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--pdt-transition);
}

.pdt-modal-close:hover {
    background: #eee;
    color: var(--pdt-danger);
}

.pdt-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.pdt-icon-search {
    margin-bottom: 16px;
}

.pdt-icon-search input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--pdt-border);
    border-radius: var(--pdt-radius-sm);
    font-size: 14px;
    transition: var(--pdt-transition);
}

.pdt-icon-search input:focus {
    border-color: var(--pdt-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.15);
}

.pdt-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
}

.pdt-icon-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--pdt-transition);
    color: var(--pdt-text);
}

.pdt-icon-option:hover {
    background: var(--pdt-bg-hover);
    border-color: var(--pdt-primary);
}

.pdt-icon-option.selected {
    background: var(--pdt-primary);
    color: #fff;
    border-color: var(--pdt-primary);
}

.pdt-icon-option.hidden {
    display: none;
}

/* Responsive - Tablet */
@media (max-width: 960px) {
    #pdt-wrap {
        margin: 15px 10px 15px 0;
        max-width: 100%;
    }
    
    .pdt-rename-input {
        max-width: 250px;
    }
    
    .pdt-legend-items {
        gap: 12px;
    }
}

/* Responsive - Mobile */
@media (max-width: 782px) {
    #pdt-wrap,
    #pdt-wrap * {
        box-sizing: border-box;
    }

    #pdt-wrap {
        margin: 10px 0;
        border-radius: 14px;
        box-shadow: none;
        border-top: 1px solid var(--pdt-border);
        max-width: 100%;
        overflow: visible;
    }
    
    #pdt-wrap .pdt-header {
        padding: 16px;
    }
    
    .pdt-title {
        font-size: 18px !important;
    }
    
    .pdt-title:before {
        width: 32px;
        height: 32px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .pdt-subtitle {
        font-size: 13px;
        margin-top: 6px;
    }
    
    #pdt-wrap form {
        padding: 16px;
        overflow: visible;
    }

    #pdt-list {
        overflow: visible;
    }
    
    /* Table - Card layout for mobile */
    .pdt-table {
        display: block;
        border: none;
        border-radius: 0;
        overflow: visible;
        width: 100%;
    }
    
    .pdt-table thead {
        display: none;
    }
    
    .pdt-table tbody {
        display: grid;
        gap: 12px;
        width: 100%;
    }
    
    .pdt-table tbody tr.pdt-menu-row,
    .pdt-table tbody tr.pdt-submenu-row {
        display: grid;
        grid-template-columns: 40px 52px minmax(0, 1fr);
        grid-template-areas:
            "drag visibility icon"
            "original original original"
            "custom custom custom";
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 14px;
        border: 1px solid var(--pdt-border);
        border-radius: 16px;
        background: #fff;
        position: relative;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
        overflow: visible;
    }
    
    .pdt-table tbody tr.pdt-menu-row:hover,
    .pdt-table tbody tr.pdt-submenu-row:hover {
        background: #fff;
    }
    
    .pdt-table td {
        border: none !important;
        padding: 0 !important;
        min-width: 0;
    }
    
    .pdt-table td.pdt-drag-cell {
        grid-area: drag;
        width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .pdt-table td.pdt-hide-cell {
        grid-area: visibility;
        width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        position: relative;
    }

    .pdt-table td.pdt-icon-cell {
        grid-area: icon;
        width: auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-height: 44px;
    }
    
    .pdt-table td.pdt-original-cell {
        grid-area: original;
        width: 100%;
        padding-top: 12px !important;
        border-top: 1px solid #edf0f4 !important;
        font-size: 15px;
        font-weight: 600;
    }
    
    .pdt-table td.pdt-custom-name-cell {
        grid-area: custom;
        width: 100%;
    }

    .pdt-original-cell::before,
    .pdt-custom-name-cell::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: var(--pdt-text-light);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.06em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .pdt-menu-label {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 6px;
        line-height: 1.35;
        max-width: 100%;
        word-break: break-word;
    }

    .pdt-slug-hint {
        margin-left: 0;
        word-break: break-all;
    }

    .pdt-icon-picker {
        justify-content: flex-end;
        width: 100%;
    }

    .pdt-hide-selector {
        position: relative;
    }

    .pdt-hide-dropdown {
        top: calc(100% + 8px);
        left: -52px;
        width: min(382px, calc(100vw - 48px));
        min-width: 0;
        max-width: calc(100vw - 48px);
        transform: none;
        text-align: left;
        z-index: 2147483647;
    }
    
    .pdt-rename-input {
        max-width: 100%;
        width: 100%;
        padding: 12px 14px;
        font-size: 15px;
    }
    
    /* Submenu rows */
    .pdt-table tbody tr.pdt-submenu-row {
        width: calc(100% - 14px);
        margin-left: 14px;
        border-left: 3px solid var(--pdt-primary) !important;
        background: #fbfcff;
    }
    
    .pdt-table tbody tr.pdt-submenu-row td {
        padding-left: 0 !important;
    }

    .pdt-submenu-indicator {
        display: inline-flex;
        width: 28px;
        height: 28px;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: #eef2ff;
        color: var(--pdt-primary);
        font-size: 15px;
        margin: 0;
    }
    
    /* Color states for mobile cards */
    .pdt-menu-row.is-hidden,
    .pdt-submenu-row.is-hidden {
        border-left: 4px solid var(--pdt-danger) !important;
    }
    
    .pdt-menu-row.has-hidden-submenu {
        border-left: 4px solid var(--pdt-warning) !important;
    }
    
    .pdt-menu-row.is-renamed,
    .pdt-submenu-row.is-renamed,
    .pdt-menu-row.has-renamed-submenu {
        border-left: 4px solid var(--pdt-primary) !important;
    }
    
    .pdt-menu-row.is-hidden td:first-child,
    .pdt-submenu-row.is-hidden td:first-child,
    .pdt-menu-row.has-hidden-submenu td:first-child,
    .pdt-menu-row.is-renamed td:first-child,
    .pdt-submenu-row.is-renamed td:first-child {
        border-left: none !important;
    }
    
    /* Submenu toggle */
    .pdt-submenu-toggle {
        font-size: 18px;
        padding: 4px;
    }
    
    /* Buttons */
    .pdt-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    #pdt-wrap #submit {
        width: 100%;
        height: 52px;
        font-size: 15px;
    }
    
    .pdt-reset-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 13px;
    }
    
    /* Summary */
    .pdt-summary {
        padding: 14px 16px;
        font-size: 14px;
        flex-wrap: wrap;
    }
    
    /* Legend */
    .pdt-legend {
        padding: 14px 16px;
    }
    
    .pdt-legend-items {
        flex-direction: column;
        gap: 10px;
    }
    
    .pdt-legend-item {
        font-size: 12px;
    }
    
    /* Notice */
    .pdt-notice {
        margin: 0 16px 16px;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    /* Modal */
    .pdt-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    
    .pdt-modal-header {
        padding: 14px 16px;
    }
    
    .pdt-modal-header h3 {
        font-size: 16px;
    }
    
    .pdt-modal-body {
        padding: 16px;
        max-height: calc(100vh - 60px);
    }
    
    .pdt-icon-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
    }
    
    .pdt-icon-option {
        width: 100%;
        height: 44px;
        font-size: 22px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .pdt-title {
        font-size: 16px !important;
        gap: 10px;
    }
    
    .pdt-title:before {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    #pdt-wrap .pdt-header,
    #pdt-wrap form {
        padding-left: 14px;
        padding-right: 14px;
    }

    .pdt-table tbody tr.pdt-menu-row,
    .pdt-table tbody tr.pdt-submenu-row {
        grid-template-columns: 36px 48px minmax(0, 1fr);
        padding: 12px;
        border-radius: 14px;
    }
    
    .pdt-icon-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .pdt-table tbody tr.pdt-submenu-row {
        width: calc(100% - 10px);
        margin-left: 10px;
    }

    .pdt-hide-dropdown {
        max-height: calc(100vh - 220px);
        overflow-y: auto;
    }
}
