/* MadiNi — Custom Styles Beyond Tailwind */

/* ─── Base ─────────────────────────────── */
* {
    font-family: 'Outfit', sans-serif;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Card Hover Effect ────────────────── */
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ─── Mineral Badge ────────────────────── */
.mineral-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* ─── Buttons ──────────────────────────── */
.btn-primary {
    background: #065F46;
    color: white;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.3);
}

.btn-secondary {
    background: #D97706;
    color: white;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-secondary:hover {
    background: #B45309;
    transform: translateY(-1px);
}

.btn-outline {
    border: 2px solid #065F46;
    color: #065F46;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
}
.btn-outline:hover {
    background: #065F46;
    color: white;
}

/* ─── Toast Notifications ──────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    padding: 14px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-width: 400px;
}
.toast-success { background: #059669; }
.toast-error { background: #DC2626; }
.toast-info { background: #2563EB; }
.toast-warning { background: #D97706; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ─── Loading Spinner ──────────────────── */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #065F46;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ─── Placeholder Images ───────────────── */
.placeholder-img {
    background: linear-gradient(135deg, var(--color-from, #065F46), var(--color-to, #D97706));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}
.placeholder-img::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

/* ─── DataTables Overrides ─────────────── */
.dataTables_wrapper {
    font-family: 'Outfit', sans-serif !important;
}
table.dataTable {
    border-collapse: collapse !important;
    border-radius: 12px;
    overflow: hidden;
}
table.dataTable thead th {
    background: #F5F5F4 !important;
    color: #1C1917;
    font-weight: 600;
    border-bottom: 2px solid #E7E5E4 !important;
    padding: 14px 16px !important;
    white-space: nowrap;
}
table.dataTable tbody td {
    padding: 12px 16px !important;
    border-bottom: 1px solid #F5F5F4 !important;
}
table.dataTable tbody tr:hover {
    background: #FAFAF9 !important;
}
.dataTables_filter input {
    border: 1px solid #D6D3D1 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    outline: none !important;
    font-family: 'Outfit', sans-serif !important;
}
.dataTables_filter input:focus {
    border-color: #065F46 !important;
    box-shadow: 0 0 0 2px rgba(6, 95, 70, 0.1) !important;
}
.dataTables_length select {
    border: 1px solid #D6D3D1 !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
}
.dataTables_info {
    font-size: 14px;
    color: #78716C;
}
.dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    margin: 0 2px !important;
}
.dataTables_paginate .paginate_button.current {
    background: #065F46 !important;
    color: white !important;
    border-color: #065F46 !important;
}

/* ─── Leaflet Popup Override ───────────── */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    font-family: 'Outfit', sans-serif !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}
.leaflet-popup-content {
    margin: 14px 18px !important;
    font-size: 14px;
}

/* ─── Timeline Styles ──────────────────── */
.timeline-line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E7E5E4;
}
.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 32px;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-dot {
    position: absolute;
    left: 16px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px currentColor;
    z-index: 1;
}

/* ─── Scrollbar Styling ────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #D6D3D1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #A8A29E;
}

/* ─── Form Input Focus ─────────────────── */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #065F46 !important;
    box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.1) !important;
}

/* ─── Responsive Tweaks ────────────────── */
@media (max-width: 768px) {
    .placeholder-img {
        font-size: 32px;
    }
    .toast {
        max-width: calc(100vw - 40px);
        font-size: 14px;
    }
}
