/* DeltaUI - Custom UI System for DeltaMax */

/* --- Custom Modal --- */
.delta-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    /* --primary with transparency */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-out;
}

.delta-modal {
    background: #ffffff;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transform: scale(0.95);
    animation: scaleUp 0.2s ease-out forwards;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.delta-modal-header {
    background: #f8fafc;
    /* --bg-body */
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    /* --border */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delta-modal-title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 700;
    color: #0f172a;
    /* --primary */
    font-size: 1.1rem;
}

.delta-modal-body {
    padding: 1.5rem;
    color: #334155;
    /* --text-main variant */
    font-size: 0.95rem;
    line-height: 1.5;
}

.delta-modal-footer {
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.delta-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.delta-btn-primary {
    background: #0f172a;
    /* --primary */
    color: white;
}

.delta-btn-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

.delta-btn-secondary {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
}

.delta-btn-secondary:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #94a3b8;
}

.delta-btn-danger {
    background: #ef4444;
    color: white;
}

.delta-btn-danger:hover {
    background: #dc2626;
}

/* --- Custom Select --- */
.delta-select-wrapper {
    position: relative;
    width: 100%;
    /* default spacing */
}

/* Hide native select but keep accessible? Or fully display:none */
.delta-select-native {
    display: none !important;
}

.delta-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    /* --border */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    color: #1e293b;
    user-select: none;
}

.delta-select-trigger:hover {
    border-color: #94a3b8;
    /* --text-light */
}

.delta-select-trigger.active {
    border-color: #3b82f6;
    /* --accent */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.delta-select-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delta-select-arrow {
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-left: 0.5rem;
}

.delta-select-trigger.active .delta-select-arrow {
    transform: rotate(-135deg) translate(-2px, -2px);
}

.delta-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease-out;
}

.delta-select-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.delta-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #334155;
    transition: background 0.15s;
    border-bottom: 1px solid #f8fafc;
}

.delta-option:last-child {
    border-bottom: none;
}

.delta-option:hover {
    background: #f1f5f9;
    /* --bg-body lighter */
    color: #0f172a;
}

.delta-option.selected {
    background: #eff6ff;
    /* light blue */
    color: #3b82f6;
    /* --accent */
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Scrollbar for options */
.delta-select-options::-webkit-scrollbar {
    width: 6px;
}

.delta-select-options::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.delta-select-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}