/**
 * CoolMo Lumise Companion — My Account: Saved Designs Stylesheet
 *
 * Styles the "My Designs" grid and individual design cards shown inside
 * the WooCommerce My Account area.
 *
 * Loaded only on is_account_page() pages via CoolMo_LC_My_Account::enqueue_assets().
 *
 * @package CoolMo_Lumise_Companion
 * @version 1.0.4
 */

/* ── Page heading ─────────────────────────────────────────────────────────── */
.coolmo-mydesigns-heading {
    font-size:   20px;
    font-weight: 600;
    margin:      0 0 16px;
    color:       #1a1a1a;
}

/* Empty state message */
.coolmo-mydesigns-empty {
    color:       #6b7280;
    font-size:   15px;
    line-height: 1.6;
}

/* ── Responsive design card grid ──────────────────────────────────────────── */
.coolmo-mydesigns-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap:                   18px;
    margin-top:            8px;
}

/* ── Individual design card ───────────────────────────────────────────────── */
.coolmo-design-card {
    border:        1px solid #e5e7eb;
    border-radius: 10px;
    overflow:      hidden;
    background:    #fff;
    transition:    box-shadow 0.2s, transform 0.15s;
}
.coolmo-design-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform:  translateY(-1px);
}

/* ── Thumbnail area ───────────────────────────────────────────────────────── */
.coolmo-design-thumb {
    background:  #f3f4f6;
    aspect-ratio:4 / 3;          /* Consistent proportions regardless of image size */
    display:     flex;
    align-items: center;
    justify-content: center;
    overflow:    hidden;
}
.coolmo-design-thumb img {
    width:       100%;
    height:      100%;
    object-fit:  cover;          /* Fill the frame, crop if needed */
    display:     block;
}
/* Emoji fallback when the thumbnail image doesn't exist */
.coolmo-design-thumb-fallback { font-size: 46px; }

/* ── Info row ─────────────────────────────────────────────────────────────── */
.coolmo-design-info {
    padding: 12px 14px 6px;
}
.coolmo-design-name {
    display:      block;
    font-size:    14px;
    font-weight:  600;
    color:        #111;
    margin-bottom:4px;
    /* Prevent very long names from breaking the card layout */
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
}
.coolmo-design-date {
    font-size: 12px;
    color:     #9ca3af;
}

/* ── Action row ───────────────────────────────────────────────────────────── */
.coolmo-design-actions { padding: 10px 14px 14px; }

/* "Continue Designing" button — full width inside the card */
.coolmo-design-continue-btn {
    display:      block   !important;
    width:        100%;
    text-align:   center  !important;
    font-size:    13px    !important;
    padding:      9px 10px !important;
    border-radius:8px     !important;
    font-weight:  600     !important;
}

/* ── Responsive adjustments ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    /* Two-column grid on small phones */
    .coolmo-mydesigns-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .coolmo-design-continue-btn { font-size: 12px !important; }
}
