﻿/* =========================================
   SMART ALERTS (Centralised, no-overlap)
   ========================================= */

.smart-alert {
    position: relative; /* IMPORTANT: anchors ::before */
    display: flex;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 8px;
    overflow: hidden;
    padding: 0; /* padding is handled in body */
    margin: 10px 0 14px 0; /* controlled spacing */
    min-height: 52px; /* avoids weird tall blocks */
}

/* Left colored block */
.smart-alert-left {
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon */
.smart-alert-icon {
    font-size: 18px;
    line-height: 1;
}

/* Content area */
.smart-alert-body {
    flex: 1 1 auto;
    padding: 10px 44px 10px 14px; /* right padding reserves close button */
    min-width: 0; /* prevents overflow with long text */
}

.smart-alert-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
    line-height: 1.2;
}

.smart-alert-message {
    font-size: 12.5px;
    line-height: 1.35;
    color: rgba(0,0,0,.72);
    word-break: break-word;
}

/* Close button (no bootstrap dependency) */
.smart-alert-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: rgba(0,0,0,.06);
    color: rgba(0,0,0,.55);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

    .smart-alert-close:hover {
        background: rgba(0,0,0,.10);
        color: rgba(0,0,0,.75);
    }

/* Accent bar */
.smart-alert::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #6c757d; /* default */
}

/* =======================
   SUCCESS
   ======================= */
.smart-alert-success {
    background: linear-gradient(135deg, #f1fff6, #ffffff);
}

    .smart-alert-success .smart-alert-left {
        background: linear-gradient(135deg, #28a745, #6fdc8c);
        color: #fff;
    }

    .smart-alert-success::before {
        background: #28a745;
    }

/* =======================
   WARNING
   ======================= */
.smart-alert-warning {
    background: linear-gradient(135deg, #fffaf0, #ffffff);
}

    .smart-alert-warning .smart-alert-left {
        background: linear-gradient(135deg, #f0ad4e, #ffd27a);
        color: #fff;
    }

    .smart-alert-warning::before {
        background: #f0ad4e;
    }

/* =======================
   DANGER
   ======================= */
.smart-alert-danger {
    background: linear-gradient(135deg, #fff1f1, #ffffff);
}

    .smart-alert-danger .smart-alert-left {
        background: linear-gradient(135deg, #dc3545, #ff7b86);
        color: #fff;
    }

    .smart-alert-danger::before {
        background: #dc3545;
    }

/* Optional helper if you add "smart-alert-attention" */
.smart-alert-attention .smart-alert-title {
    letter-spacing: .2px;
}

/* Responsive tightening */
@media (max-width: 576px) {
    .smart-alert-left {
        flex-basis: 50px;
    }

    .smart-alert-body {
        padding-right: 40px;
    }
}
