.mysp-sl-wrap {
    max-width: 100%;
    margin: 0;
    padding: 20px;
}

.mysp-sl-box {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

.mysp-sl-input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 6px !important;
	background-color: white !important;
	display: block;
    margin-bottom: 14px;
}

#mysp-slug {
	font-weight:bold;
}

.mysp-sl-btn {
    background: #10b981;
    color: #fff;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
	font-weight:600;
}

.mysp-sl-btn:hover {
    background: #059669;
}
@media (max-width: 768px) {
    .mysp-sl-btn {
        width: 100%;
        display: block;
    }
}

/* =========================
   WRAPPER (ONLY ONCE)
========================= */
.mysp-sl-table-wrap{
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* =========================
   TABLE BASE
========================= */
.mysp-sl-table{
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

/* =========================
   HEADER (FIXED STYLE)
========================= */
#mysp-sl-table thead th,
#mysp-sl-table.dataTable thead th,
table.dataTable thead th{
    background-color: #1e73be !important;
    color: #fff !important;

    font-weight: 700 !important;
    text-align: center !important;

    vertical-align: middle;
    border-bottom: none !important;
}

/* =========================
   CELL DEFAULT
========================= */
.mysp-sl-table th,
.mysp-sl-table td{
    padding: 10px;
    vertical-align: middle;
    white-space: nowrap;
}

/* =========================
   TEXT OVERFLOW (ONLY LONG TEXT)
========================= */
#mysp-sl-table td:nth-child(2),
#mysp-sl-table td:nth-child(3),
#mysp-sl-table td:nth-child(4){
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}
#mysp-sl-table td:nth-child(5),
#mysp-sl-table td:nth-child(6)
{
    text-align: center;
}


/* MESSAGE NOTIFICATION (FLOATING) */
/* NOTICE BASE (FLOATING) */
#mysp-notice {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;

    min-width: 260px;
    max-width: 90%;
    padding: 14px 40px 14px 16px;

    border-radius: 8px;
    font-size: 15.5px; 
    font-weight: 500;

    box-shadow: 0 6px 16px rgba(0,0,0,.15);
    animation: fadeInUp .3s ease;
}

/* BORDER LEFT ACCENT */
#mysp-notice.success {
    background: #e6ffed;
    color: #1a7f37;
    border: 1px solid #b7ebc6;
    border-left: 5px solid #22c55e; 
}

#mysp-notice.error {
    background: #ffecec;
    color: #b42318;
    border: 1px solid #f5c2c7;
    border-left: 5px solid #ef4444; 
}

/* CLOSE BUTTON */
#mysp-notice .close-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    cursor: pointer;
    font-size: 14px;
    opacity: .6;
}

#mysp-notice .close-btn:hover {
    opacity: 1;
}

/* ANIMATION */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}
/*END MESSAGE*/

#mysp-target[readonly] {
    background-color: #e9e9e9 !important;
    cursor: not-allowed;
    color: #555;
}

/* GROUP SHORTLINK */
.mysp-sl-group {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}
/* LABEL MENYATU */
.mysp-sl-label {
    background: #1e73be; 
    color: #fff;
    padding: 6px 10px;
    font-weight: 600;
}

/* ROW INPUT */
.mysp-sl-row {
    display: flex;
    align-items: center;
}

/* PREFIX DOMAIN */
.mysp-sl-prefix {
    background: #f3f4f6;
    padding: 8px 10px;
    border-right: 1px solid #ddd;
    white-space: nowrap;
}

/* INPUT TANPA BORDER (karena sudah ada box luar) */
.mysp-sl-group .mysp-sl-input-slug {
    border: none;
    margin-top: 0;
    border-radius: 0;
}
.mysp-sl-input-slug {
	width: 100%;
}

.mysp-sl-lbl, .mysp-sl-checkbox {
    font-weight: bold;
	display: block;
    margin-bottom: 6px;
}

/*EDIT ICON*/
.mysp-sl-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f1f1f1;
    text-decoration: none;
}

.mysp-sl-icon-btn:hover {
    background: #e0e0e0;
}

.mysp-sl-edit {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}



/*ADMIN PAGE*/
#mysp-sl-users tbody tr,
#mysp-sl-links tbody tr,
#mysp-sl-clicks tbody tr {
    cursor: pointer !important;
    transition: background 0.15s ease;
}

#mysp-sl-users tbody tr:hover,
#mysp-sl-links tbody tr:hover,
#mysp-sl-clicks tbody tr:hover {
    background: #f3f4f6;
}

/*DATE PICKER*/
/* GRID 2 KOLOM */
.mysp-sl-date-grid{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:12px;
    margin-top:10px;
}

/* ITEM */
.mysp-sl-date-item{
    display:flex;
    flex-direction:column;
}

/* INPUT BIAR RAPI */
.mysp-sl-date-item input{
    height:38px;
}

/* RESPONSIVE */
@media (max-width:600px){
    .mysp-sl-date-grid{
        grid-template-columns: 1fr;
    }
}

/*TOOLTIP*/
.mysp-copy-tooltip {
    position: absolute;
    background: #111;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 9999;
    transform: translate(-50%, -120%);
    opacity: 0;
    transition: 0.2s;
    pointer-events: none;
}
.mysp-copy-tooltip.show {
    opacity: 1;
}

/*ON/OFF*/
.mysp-sl-toggle-status {
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    background: transparent;
    padding: 2px;
    border-radius: 6px;

    transition: all 0.15s ease-in-out;
}

/* remove underline semua state */
.mysp-sl-toggle-status:link,
.mysp-sl-toggle-status:visited,
.mysp-sl-toggle-status:hover,
.mysp-sl-toggle-status:active {
    text-decoration: none !important;
}

/* icon style */
.mysp-sl-toggle-status .dashicons {
    font-size: 18px;
    line-height: 1;
    text-decoration: none !important;
}

/* hover effect biar feel app */
.mysp-sl-toggle-status:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.08);
}

/* ACTIVE icon */
.mysp-sl-toggle-status .dashicons-yes-alt {
    color: #10b981; /* green */
}

/* DEACTIVE icon */
.mysp-sl-toggle-status .dashicons-dismiss {
    color: #9ca3af; /* gray */
}

/* optional: smooth click feel */
.mysp-sl-toggle-status:active {
    transform: scale(0.95);
}

.mysp-sl-toggle-status {
    position: relative;
}

/* tooltip box */
.mysp-sl-toggle-status::after {
    content: attr(data-tooltip);
    position: absolute;

    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);

    background: rgba(0, 0, 0, 0.85);
    color: #fff;

    padding: 4px 8px;
    border-radius: 6px;

    font-size: 11px;
    white-space: nowrap;

    opacity: 0;
    visibility: hidden;

    transition: all 0.15s ease-in-out;

    pointer-events: none;
    z-index: 9999;
}

/* arrow */
.mysp-sl-toggle-status::before {
    content: "";
    position: absolute;

    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);

    border-width: 5px;
    border-style: solid;

    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;

    opacity: 0;
    visibility: hidden;

    transition: all 0.15s ease-in-out;

    pointer-events: none;
}

/* show tooltip */
.mysp-sl-toggle-status:hover::after,
.mysp-sl-toggle-status:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* FORCE DATATABLE MOBILE LEFT ALIGN */
@media (max-width: 768px) {

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        text-align: left !important;
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0 !important;
    }

    .dataTables_wrapper .dataTables_length select {
        width: auto;
        margin-left: 0 !important;
    }

    .dataTables_wrapper .dataTables_paginate {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px;
    }
}

/*QR CODE*/
#mysp-sl-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.mysp-sl-qr-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.mysp-sl-qr-box {
    position: relative;
    width: 300px;
    max-width: 90%;
    margin: 8% auto;
    background: #fff;
    padding: 12px 12px 10px;
    border-radius: 12px;
    text-align: center;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* QR IMAGE */
#mysp-sl-qr-image {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
    margin: 0 auto 8px;
}

/* ACTION AREA */
.mysp-sl-qr-actions {
    margin: 8px 0 4px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mysp-sl-qr-actions a,
.mysp-sl-qr-actions button {
    flex: 1;              /* <-- kunci utama */
    padding: 8px 0;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    text-align: center;
    transition: 0.15s ease;
}

/* DOWNLOAD */
#mysp-sl-qr-download {
    background: #6366f1;
    color: #fff;
}

/* CLOSE */
#mysp-sl-qr-close {
    background: #6b7280;
    color: #fff;
}

/* HOVER */
.mysp-sl-qr-actions a:hover,
.mysp-sl-qr-actions button:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/*LOADING*/
.mysp-sl-loading {
    pointer-events: none;
    opacity: 0.6;
}

.mysp-action-wrap{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* KUNCI KOLOM ACTION BIAR TIDAK MELEBAR */
#mysp-sl-table td:first-child,
#mysp-sl-table th:first-child{
    width: 110px;
    text-align: center;
    white-space: nowrap;
}

/* QR ICON HARUS DIKUNCI */
.mysp-sl-qr-btn{
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

/* =====================
   ACTION WRAPPER
===================== */
.mysp-sl-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

/* =====================
   BASE BUTTON (RESET + STYLE)
===================== */
.mysp-sl-btn {
    appearance: none;
    -webkit-appearance: none;

    border: none;
    outline: none;
    background: none;

    font-family: inherit;
    font-size: 14px;
    line-height: 1; /* 🔥 penting biar tinggi konsisten */

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 10px 16px;
    border-radius: 6px;

    cursor: pointer;
    transition: all .2s ease;
}

/* =====================
   ICON FIX (dashicons)
===================== */
.mysp-sl-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =====================
   PRIMARY BUTTON
===================== */
.mysp-sl-btn-primary {
    background: #2563eb;
    color: #fff;
}

.mysp-sl-btn-primary:hover {
    background: #1d4ed8;
}

.mysp-sl-btn-primary:active {
    transform: scale(0.97);
}

/* =====================
   SECONDARY BUTTON (CANCEL)
===================== */
.mysp-sl-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb; /* 🔥 biar lebih tegas */
}

.mysp-sl-btn-secondary:hover {
    background: #e5e7eb;
}

.mysp-sl-btn-secondary:active {
    transform: scale(0.97);
}

/* =====================
   FOCUS (ACCESSIBILITY)
===================== */
.mysp-sl-btn:focus {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* =====================
   DISABLED STATE
===================== */
.mysp-sl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =====================
   OPTIONAL: SMALL VARIANT
===================== */
.mysp-sl-btn.sm {
    padding: 6px 10px;
    font-size: 13px;
}

/* =====================
   OPTIONAL: FULL WIDTH (MOBILE)
===================== */
@media (max-width: 480px) {
    .mysp-sl-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mysp-sl-btn {
        width: 100%;
    }
}