/* ==========================================================================
   NetCredit Credits Display — Frontend Styles
   
   CSS Custom Properties (injected from admin settings):
   --nc-primary:       Primary CTA color
   --nc-primary-hover: CTA hover color
   --nc-text:          Text color
   --nc-radius:        Border radius in px
   --nc-cols:          Grid columns (set inline per shortcode)
   ========================================================================== */

/* Grid layout */
.nc-credits-wrap {
    display: grid;
    gap: 16px;
    margin: 1.5em 0;
}

.nc-credits-box {
    grid-template-columns: repeat(var(--nc-cols, 3), 1fr);
}

/* Card */
.nc-credits-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: var(--nc-radius, 8px);
    padding: 24px 20px 20px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.nc-credits-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Featured card accent */
.nc-credits-card--featured {
    border-color: var(--nc-primary, #1D9E75);
    border-width: 2px;
}

/* Tag badge */
.nc-credits-tag {
    position: absolute;
    top: -1px;
    right: 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 3px 10px 4px;
    border-radius: 0 0 var(--nc-radius, 8px) var(--nc-radius, 8px);
    color: #fff;
    line-height: 1.3;
}

.nc-credits-tag--popular {
    background: #e67e22;
}

.nc-credits-tag--bargain {
    background: var(--nc-primary, #1D9E75);
}

.nc-credits-tag--newest {
    background: #3498db;
}

/* Logo */
.nc-credits-logo {
    width: 100px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.nc-credits-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nc-credits-logo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    color: #888;
    text-transform: uppercase;
}

/* Credit name */
.nc-credits-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--nc-text, #333);
    line-height: 1.3;
}

/* Data fields */
.nc-credits-fields {
    width: 100%;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.nc-credits-field {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    font-size: 13px;
    line-height: 1.4;
}

.nc-credits-field-label {
    color: #888;
}

.nc-credits-field-value {
    font-weight: 600;
    color: var(--nc-text, #333);
    text-align: right;
}

/* CTA */
.nc-credits-cta {
    width: 100%;
    margin-top: auto;
}

.nc-credits-cta-btn,
.nc-credits-cta a {
    display: block;
    width: 100%;
    padding: 11px 16px;
    background: var(--nc-primary, #1D9E75);
    color: #fff !important;
    border: none;
    border-radius: var(--nc-radius, 8px);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
    line-height: 1.4;
}

.nc-credits-cta-btn:hover,
.nc-credits-cta a:hover {
    background: var(--nc-primary-hover, #0F6E56);
    transform: scale(0.98);
    color: #fff !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .nc-credits-box {
        grid-template-columns: 1fr;
    }

    .nc-credits-card {
        padding: 20px 16px 16px;
    }
}

/* Tablet: 2 columns if more than 2 cards */
@media (min-width: 769px) and (max-width: 1024px) {
    .nc-credits-box {
        grid-template-columns: repeat(2, 1fr);
    }
}
