/* HIDDEN UTILITY */
.hidden { 
    display: none !important; 
}

/* GRID LAYOUT */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
    padding: 20px 0;
}

/* CARD CONTAINER */
.recipe-card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    padding-bottom: 38px; /* space for bottom buttons */
    height: 260px; /* business-card height */
}

.recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

/* CLICKABLE AREA */
.card-main {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* IMAGE */
.recipe-card-image img,
.recipe-card-image .placeholder-image {
    width: 100%;
    height: 110px; /* reduced height */
    object-fit: cover;
    background: #eee;
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 14px;
}

/* TITLE */
.recipe-card-body {
    padding: 10px 12px 40px; /* extra bottom padding for buttons */
}

.recipe-title,
.card-title {
    padding: 8px 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: #333;
    line-height: 1.2;
    margin: 0;
}

/* BOTTOM ACTION BUTTONS */
.card-actions {
    position: absolute;
    bottom: 6px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    pointer-events: none; /* card stays clickable */
}

.card-actions a,
.card-actions button {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    padding: 0;
    margin: 0;

    font-size: 18px;
    line-height: 1;
    border: none;
    background: #ffffffcc;
    border-radius: 5px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s ease;
}

.card-actions button {
    appearance: none;
}

.card-actions a:hover,
.card-actions button:hover {
    background: #fff;
}

/* DELETE FORM NORMALIZATION */
.card-delete-form {
    margin: 0;
    padding: 0;
}

/* TOP-LEFT SHARE BUTTON (if used) */
.card-share {
    position: absolute;
    top: 6px;
    left: 6px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    padding: 0;
    margin: 0;

    font-size: 16px;
    line-height: 1;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.85);
    border-radius: 5px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s ease;
}

.card-share:hover {
    background: #fff;
}

/* PRINT BUTTON (hidden on cards) */
.card-print {
    display: none !important;
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 280px;
    text-align: center;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary {
    background: #bdc3c7;
    color: black;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

/* REMOVE ALL BUTTONS FROM CARDS */
.card-actions,
.card-actions a,
.card-actions button,
.card-share,
.card-delete-form {
    display: none !important;
}

/* Hard kill any leftover card buttons, just in case */
.card-actions,
.card-actions a,
.card-actions button,
.card-top-actions,
.card-top-actions button,
.card-share,
.card-print,
.card-edit,
.card-delete,
.card-delete-form {
    display: none !important;
}
