/* ===== Global Styles ===== */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 20px;
    color: #333;
}

/* Center content and set max width */
body, html {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Page Title ===== */
h1 {
    color: #1f7a36; /* Safaricom dark green */
    margin-bottom: 10px;
    text-align: center;
}

hr {
    width: 100%;
    max-width: 700px;
    border: 0;
    border-top: 2px solid #e0e0e0;
    margin: 20px 0;
}

/* ===== Input Section ===== */
#input-container {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

#input-container label {
    margin-bottom: 8px;
    font-weight: 600;
}

#input-container input {
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
    outline: none;
    transition: 0.2s;
}

#input-container input:focus {
    border-color: #28a745;      /* Safaricom green */
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.3);
}

/* ===== Calculate Button ===== */
#calculate_btn {
    background: #28a745;    /* Safaricom green */
    color: white;
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 20px;
}

#calculate_btn:hover {
    background: #1f7a36;    /* Darker green */
    transform: translateY(-1px);
}

/* ===== Section Title ===== */
h3 {
    margin-bottom: 10px;
    color: #1f7a36;
}

/* ===== Safaricom Results Table ===== */
.safaricom-table {
    width: 100%;
    max-width: 700px;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.safaricom-table thead {
    background: #1f7a36;
    color: white;
}

.safaricom-table th,
.safaricom-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.safaricom-table tbody tr:hover {
    background: #f5f5f5;
}

.safaricom-table td {
    color: #333;
    font-size: 15px;
}

.safaricom-table th {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    #input-container, .safaricom-table {
        width: 95%;
    }

    #calculate_btn {
        width: 95%;
    }

    .safaricom-table th,
    .safaricom-table td {
        font-size: 13px;
        padding: 12px 10px;
    }
}
/* ===== Footer ===== */
footer {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;

    background: #1f7a36;       /* Safaricom dark green */
    color: white;
    font-size: 14px;
    letter-spacing: 0.5px;

    position: fixed;
    bottom: 0;
    left: 0;

    box-shadow: 0 -3px 10px rgba(0,0,0,0.08);
}
@media (max-width: 600px) {
    .safaricom-table {
        border: 0;
        box-shadow: none;
    }

    .safaricom-table thead {
        display: none; /* hide table header */
    }

    .safaricom-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 10px;
        background: white;
        box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    }

    .safaricom-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 10px;
        border: 0;
        font-size: 14px;
        position: relative;
    }

    .safaricom-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #1f7a36;
        flex-basis: 50%;
        text-align: left;
    }

    .safaricom-table td:last-child {
        text-align: right;
    }
}
.notification {
    display: none; /* hidden by default */
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #28a745; /* Safaricom green */
    color: white;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.notification.show {
    display: block;
    opacity: 1;
}
.safaricom-table.highlight {
    animation: highlightAnim 1s ease-in-out;
}

@keyframes highlightAnim {
    0% { box-shadow: 0 0 0 rgba(40,167,69,0); }
    50% { box-shadow: 0 0 12px rgba(40,167,69,0.5); }
    100% { box-shadow: 0 0 0 rgba(40,167,69,0); }
}
