/* ═══════════════════════════════════════════════════════════════════
   iMine Dialog Overrides — $.confirm / $.alert
   ═══════════════════════════════════════════════════════════════════ */

/* ── Backdrop ─────────────────────────────────────────────────────── */
.jconfirm-bg {
    background: rgba(40, 48, 52, 0.55) !important;
}

/* ── Dialog card ──────────────────────────────────────────────────── */
.jconfirm .jconfirm-box {
    background: #ffffff !important;
    border: none !important;
    border-top: none !important;
    border-radius: 12px !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.10),
        0 16px 40px rgba(0, 0, 0, 0.14) !important;
    padding: 0 !important;
    min-width: 320px !important;
    max-width: 500px !important;
    width: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: hidden !important;
    animation: gc-dlg-in 0.22s cubic-bezier(0.34, 1.3, 0.64, 1) both !important;
    animation-iteration-count: 1 !important;
}

/* Gold gradient top strip via pseudo-element (border-image kills border-radius) */
.jconfirm .jconfirm-box::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 5px !important;
    background: linear-gradient(
        90deg,
        #a88c30 0%,
        #c8a83c 20%,
        #e0c860 40%,
        #cdb040 55%,
        #aa8e28 72%,
        #d4b848 88%,
        #ae9030 100%
    ) !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

/* Neutralize library's coloured border-top and pulse loops */
.jconfirm .jconfirm-box.jconfirm-type-animated,
.jconfirm .jconfirm-box[class*="jconfirm-type-"] {
    border-top: none !important;
    animation-name: gc-dlg-in !important;
    animation-duration: 0.22s !important;
    animation-timing-function: cubic-bezier(0.34, 1.3, 0.64, 1) !important;
    animation-fill-mode: both !important;
    animation-iteration-count: 1 !important;
}

@keyframes gc-dlg-in {
    from { transform: translateY(12px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* ── Close icon ───────────────────────────────────────────────────── */
.jconfirm .jconfirm-box div.jconfirm-closeIcon {
    color: #b8b0a0 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    opacity: 1 !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 10 !important;
    transition: color 0.15s !important;
}

.jconfirm .jconfirm-box div.jconfirm-closeIcon:hover {
    color: #5a4e3a !important;
    opacity: 1 !important;
}

/* ── Title area — warm parchment header ───────────────────────────── */
.jconfirm .jconfirm-box div.jconfirm-title-c {
    position: relative !important;
    background: linear-gradient(135deg, #f5f0e6 0%, #faf6ef 60%, #f7f2e8 100%) !important;
    border-bottom: 1px solid #e8dfc8 !important;
    padding: 18px 44px 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    overflow: hidden !important;
    /* Push below the gold strip */
    margin-top: 5px !important;
}

/* Subtle warm shimmer across header */
.jconfirm .jconfirm-box div.jconfirm-title-c::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -70% !important;
    width: 35% !important;
    height: 100% !important;
    background: linear-gradient(
        110deg,
        transparent 25%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 75%
    ) !important;
    animation: gc-dlg-shimmer 0.9s ease-out 1 !important;
    pointer-events: none !important;
}

@keyframes gc-dlg-shimmer {
    0%   { left: -70%; }
    55%  { left: 120%; }
    100% { left: 120%; }
}

/* Icon: gold circle badge */
.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    background: linear-gradient(
        135deg,
        #a88c30 0%,
        #c8a83c 25%,
        #e0c860 50%,
        #cdb040 75%,
        #aa8e28 100%
    ) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 2px rgba(80, 50, 0, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.18) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    color: #2a1f00 !important;
    font-size: 15px !important;
}

.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c i {
    font-size: 15px !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c:empty {
    display: none !important;
}

/* Title text */
.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title {
    font-family: "Century Gothic", Arial, sans-serif !important;
    font-size: 1em !important;
    font-weight: 700 !important;
    color: #3a2e18 !important;
    letter-spacing: 0.1px !important;
    text-shadow: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
    background: none !important;
}

/* ── Content — no scroll, sizes to text ───────────────────────────── */
.jconfirm .jconfirm-box div.jconfirm-content-pane {
    padding: 18px 20px 4px !important;
    margin-bottom: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
}

.jconfirm .jconfirm-box div.jconfirm-content {
    font-family: "Century Gothic", Arial, sans-serif !important;
    font-size: 13px !important;
    color: #5a5248 !important;
    line-height: 1.6 !important;
}

/* ── Buttons container ────────────────────────────────────────────── */
.jconfirm .jconfirm-box div.jconfirm-buttons {
    padding: 12px 20px 18px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    background: transparent !important;
    border-top: 1px solid #f0ece2 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ── Button base ──────────────────────────────────────────────────── */
.jconfirm .jconfirm-buttons button,
.jconfirm .jconfirm-buttons .btn {
    font-family: "Century Gothic", Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    border-radius: 6px !important;
    padding: 6px 20px !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

/* ── Gold — primary / confirm / yes / btn-blue ────────────────────── */
.jconfirm .jconfirm-buttons .btn-blue,
.jconfirm .jconfirm-buttons .btn-goldCreek,
.jconfirm .jconfirm-buttons .btn-primary {
    color: #1c1c1c !important;
    border: 1px solid #9a7114 !important;
    background: linear-gradient(
        135deg,
        #a88c30 0%,
        #c8a83c 18%,
        #e0c860 38%,
        #cdb040 52%,
        #aa8e28 70%,
        #d4b848 88%,
        #ae9030 100%
    ) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        inset 0 -2px 3px rgba(91, 57, 0, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.18) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.jconfirm .jconfirm-buttons .btn-blue:hover,
.jconfirm .jconfirm-buttons .btn-goldCreek:hover,
.jconfirm .jconfirm-buttons .btn-primary:hover {
    color: #111 !important;
    transform: translateY(-1px) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 -2px 3px rgba(91, 57, 0, 0.25),
        0 4px 10px rgba(0, 0, 0, 0.22) !important;
}

.jconfirm .jconfirm-buttons .btn-blue:active,
.jconfirm .jconfirm-buttons .btn-goldCreek:active,
.jconfirm .jconfirm-buttons .btn-primary:active {
    transform: translateY(1px) !important;
    box-shadow: inset 0 2px 5px rgba(80, 50, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* ── Silver — cancel / close / no ────────────────────────────────── */
.jconfirm .jconfirm-buttons .btn-default,
.jconfirm .jconfirm-buttons .btn-grey {
    color: #1a1a1a !important;
    border: 1px solid #aaa !important;
    background: linear-gradient(
        135deg,
        #b0b0b0 0%,
        #d4d4d4 22%,
        #f2f2f2 40%,
        #dcdcdc 55%,
        #c0c0c0 72%,
        #d8d8d8 88%,
        #bcbcbc 100%
    ) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        inset 0 -2px 3px rgba(0, 0, 0, 0.15),
        0 2px 5px rgba(0, 0, 0, 0.15) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

.jconfirm .jconfirm-buttons .btn-default:hover,
.jconfirm .jconfirm-buttons .btn-grey:hover {
    color: #000 !important;
    transform: translateY(-1px) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 -2px 3px rgba(0, 0, 0, 0.10),
        0 4px 10px rgba(0, 0, 0, 0.18) !important;
}

.jconfirm .jconfirm-buttons .btn-default:active,
.jconfirm .jconfirm-buttons .btn-grey:active {
    transform: translateY(1px) !important;
    background: linear-gradient(135deg, #606060 0%, #787878 35%, #909090 70%, #707070 100%) !important;
    color: #fff !important;
    border-color: #555 !important;
}

/* ── Red — danger ─────────────────────────────────────────────────── */
.jconfirm .jconfirm-buttons .btn-red,
.jconfirm .jconfirm-buttons .btn-danger {
    color: #fff !important;
    border: 1px solid #a02020 !important;
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 40%, #c0392b 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 5px rgba(0, 0, 0, 0.18) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25) !important;
}

.jconfirm .jconfirm-buttons .btn-red:hover,
.jconfirm .jconfirm-buttons .btn-danger:hover {
    transform: translateY(-1px) !important;
}

.jconfirm .jconfirm-buttons .btn-red:active,
.jconfirm .jconfirm-buttons .btn-danger:active {
    transform: translateY(1px) !important;
}

/* ── Green — success ──────────────────────────────────────────────── */
.jconfirm .jconfirm-buttons .btn-green,
.jconfirm .jconfirm-buttons .btn-success {
    color: #fff !important;
    border: 1px solid #2a7a2a !important;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 40%, #27ae60 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 5px rgba(0, 0, 0, 0.16) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18) !important;
}

.jconfirm .jconfirm-buttons .btn-green:hover,
.jconfirm .jconfirm-buttons .btn-success:hover {
    transform: translateY(-1px) !important;
}

.jconfirm .jconfirm-buttons .btn-green:active,
.jconfirm .jconfirm-buttons .btn-success:active {
    transform: translateY(1px) !important;
}

/* ── Orange — warning ─────────────────────────────────────────────── */
.jconfirm .jconfirm-buttons .btn-orange,
.jconfirm .jconfirm-buttons .btn-warning {
    color: #2a1a00 !important;
    border: 1px solid #c87400 !important;
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 40%, #e67e22 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 5px rgba(0, 0, 0, 0.16) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.jconfirm .jconfirm-buttons .btn-orange:hover,
.jconfirm .jconfirm-buttons .btn-warning:hover {
    transform: translateY(-1px) !important;
}

.jconfirm .jconfirm-buttons .btn-orange:active,
.jconfirm .jconfirm-buttons .btn-warning:active {
    transform: translateY(1px) !important;
}
