/*
* WOOSIS FONTS PREVIEW - CONSOLIDATED FRONTEND STYLES
* Includes: Global Reset, Accent Variables, Responsive Grid, Controls (Slider & Buttons), and Cards.
*/

/* --- Global Reset & Typography --- */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

/* --- CSS Variables --- */
:root {
    --wfp-accent-color: #4A90E2;
    --wfp-gold-color: #D4AF37;
    --wfp-silver-color: #C0C0C0;
    --wfp-rosegold-color: #FF577D;
    --wfp-black-color: #000000;
    --wfp-card-bg: #ffffff;
    --wfp-border-color: #e0e0e0;
}

/* --- Container and Headings --- */
.wfp-container {
    max-width: 1200px;
    margin: 10px auto 0; 
    padding: 20px 20px 40px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.wfp-heading-container {
    margin-top: 0;
    margin-bottom: 0; 
    text-align: center;
}

.wfp-heading {
    color: #333;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

.wfp-description {
    text-align: center;
    margin-bottom: 0; 
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.wfp-description p {
    margin: 0; 
}

/* --- Controls: Two-Row Layout --- */
.wfp-controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.wfp-input-group {
    display: flex;
    flex-direction: column;
}

.wfp-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
    text-align: left;
}

.wfp-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.wfp-input:focus {
    border-color: var(--wfp-accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

/* Row 2: Side-by-side group */
.wfp-row-group {
    display: flex;
    gap: 24px;
    width: 100%;
}

.wfp-half {
    flex: 1;
    min-width: 0;
}

/* Mobile: stack Line Height and Jewellery */
@media (max-width: 640px) {
    .wfp-row-group {
        flex-direction: column;
        gap: 16px;
    }
}

/* --- Line Height Slider --- */
.wfp-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 90% !important;
    height: 8px;
    background: #336209;
    outline: none;
    opacity: 0.8;
    transition: opacity .2s;
    border-radius: 4px;
    margin-top: 4px;
}

.wfp-slider:hover {
    opacity: 1;
}

.wfp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffbe5a !important;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.wfp-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffbe5a !important;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* --- Metal Buttons (Compact Single Row) --- */
.wfp-metals {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: flex-start; /* Align left under label */
    align-items: center;
    padding-top: 4px;
}

.wfp-metal-btn {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 2px solid #ddd;
    border-radius: 16px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: all 0.3s;
    background: #fff;
    color: #333;
    min-width: 60px;
    text-align: center;
    line-height: 1.2;
    box-sizing: border-box;
}

.wfp-metal-btn.active {
    transform: scale(1.03);
    color: #fff;
    background: var(--wfp-accent-color);
    border-color: var(--wfp-accent-color);
}

/* Individual metal color overrides */
.wfp-btn-gold.active { background: #D4AF37; border-color: #D4AF37; }
.wfp-btn-silver.active { background: #C0C0C0; border-color: #C0C0C0; color: #333; }
.wfp-btn-rosegold.active { background: #FF577D; border-color: #FF577D; }
.wfp-btn-black.active { background: #000000; border-color: #000000; }

/* Mobile: slightly smaller buttons */
@media (max-width: 640px) {
    .wfp-metal-btn {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 50px;
    }
}

/* --- Download All Button --- */
.wfp-action-btn {
    background: var(--wfp-accent-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto 30px;
}

.wfp-action-btn:hover {
    background: #ffbe5a;
}

.wfp-action-btn:active {
    transform: translateY(1px);
}

/* --- Font Grid and Cards --- */
.wfp-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 20px;
}

/* Responsive Grid */
@media (min-width: 1400px) {
    .wfp-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 1200px) {
    .wfp-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .wfp-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .wfp-grid { grid-template-columns: 1fr; }
}

.wfp-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.3s;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wfp-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Card Number - Top Right */
.wfp-card-number {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--wfp-accent-color);
    color: white;
    padding: 8px 10px;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

/* Download Icon - Top Left */
.wfp-download-icon {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--wfp-accent-color);
    color: white;
    width: 32px;
    height: 32px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
    user-select: none;
}

.wfp-download-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.wfp-download-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.wfp-preview-text {
    flex-grow: 1;
    font-size: 24px;
    margin: 15px 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    word-break: break-word;
    transition: color 0.3s;
    white-space: pre-wrap;
}

/* Metal Effect Classes */
.wfp-card.effect-golden .wfp-preview-text { color: var(--wfp-gold-color); }
.wfp-card.effect-silver .wfp-preview-text { color: var(--wfp-silver-color); }
.wfp-card.effect-rosegold .wfp-preview-text { color: var(--wfp-rosegold-color); }
.wfp-card.effect-black .wfp-preview-text { color: var(--wfp-black-color); }

/* Bottom Logo */
.wfp-text-logo-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.wfp-text-logo {
    max-width: 120px;
    height: auto;
    opacity: 0.9;
}

/* --- Global Mobile Adjustments --- */
@media (max-width: 640px) {
    .wfp-heading {
        font-size: 24px;
    }
    .wfp-preview-text {
        font-size: 20px;
    }
}