/* === Fab-Hack Page Styles === */

/* Gradient section headings */
.fab-heading {
    width: 100%;
    background: linear-gradient(135deg, #0f3b1d, #00c853, #002911);
    color: #fff;
    text-align: center;
    padding: 15px 20px;
    margin: 40px 0 25px;
    font-size: 26px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* Incoming FabHack tiles grid */
.incoming-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
}

/* When there are no hacks (only the .no-hacks element) */
.incoming-container:has(.no-hacks) {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 10vh; /* adjust as needed */
}

.incoming-tile {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    padding: 30px;
    border-left: 10px solid #2e7d32;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.incoming-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.incoming-title {
    font-size: 24px;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 15px;
}

.incoming-detail {
    font-size: 16px;
    margin: 8px 0;
    color: #333;
}

/* Button inside tiles */
.incoming-button {
    margin-top: 15px;
    display: inline-block;
    text-align: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2e7d32, #00c853);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.incoming-button:hover {
    background: linear-gradient(135deg, #1b5e20, #009624);
    transform: scale(1.05);
}

/* === History Section === */
.history-container {
    max-width: 1200px;
    margin: 40px auto;       /* centers horizontally */
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-left: 10px solid #555;

    /* NEW: safe space from screen edges */
    width: calc(100% - 40px);   /* full width minus 20px left/right */
}

.history-table-wrapper {
    overflow-x: auto;
    padding-bottom: 10px;  /* space for scrollbar */
}


.history-title {
    font-size: 24px;
    font-weight: bold;
    color: #111;
    margin-bottom: 20px;
    text-align: center;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}


.history-table th,
.history-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.history-table th {
    background: #333;
    color: #fff;
    font-weight: bold;
}

.history-table tr:nth-child(even) {
    background: #f9f9f9;
}


.no-hacks {
    color: #b71c1c; /* dark red text */
    background-color: #ffebee; /* light red background */
    border: 1px solid #f44336; /* red border */
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    width: fit-content;       /* shrink to fit text */
    margin: auto;             /* allow auto-centering */
}


.no-fabhacks td {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 16px;
    background-color: #f9f9f9;   /* light gray background */
    border: 1px solid #ddd;      /* subtle border */
}

/* === Responsive Breakpoints === */
@media (max-width: 768px) {
    .fab-heading {
        font-size: 22px;
        padding: 12px;
    }

    .incoming-container {
        grid-template-columns: 1fr; /* stack tiles */
        padding: 15px;
    }

    .incoming-tile {
        min-height: auto;
        padding: 20px;
    }

    .incoming-title {
        font-size: 20px;
    }

    .incoming-detail {
        font-size: 14px;
    }

    .incoming-button {
        font-size: 14px;
        padding: 10px;
    }
 .history-table,
    .history-table thead,
    .history-table tbody,
    .history-table th,
    .history-table td,
    .history-table tr {
        display: block;
        width: 100%;
    }

    .history-table thead {
        display: none; /* hide headers */
    }

    .history-table tr {
        margin-bottom: 15px;
        background: #fafafa;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        padding: 12px;
    }

    .history-table td {
        border: none;
        padding: 8px 10px;
        font-size: 14px;
        position: relative;
    }

    /* Add labels before each cell */
    .history-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #2e7d32;
        display: block;
        margin-bottom: 4px;
    }


}

@media (max-width: 480px) {
    .fab-heading {
        font-size: 20px;
    }

    .incoming-title {
        font-size: 18px;
    }

    .incoming-detail {
        font-size: 13px;
    }

    .incoming-button {
        font-size: 13px;
        padding: 8px;
    }

     .history-container {
        margin: 15px; /* keep away from screen edge */
        padding: 15px;
    }

    .history-table th,
    .history-table td {
        padding: 10px;
        font-size: 14px;
    }
}

