/* ============================================================
   FGS Product Customizer - Stylesheet
   ============================================================ */

/* ---- Trigger Button ---- */
.fgs-customize-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #c0392b;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    justify-content: center;
}
.fgs-customize-btn:hover { background: #a93226; transform: translateY(-1px); }

/* ---- Overlay & Modal ---- */
.fgs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.fgs-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    animation: fgsSlideUp 0.3s ease;
}

@keyframes fgsSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Header ---- */
.fgs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 3px solid #c0392b;
    background: #fff;
    flex-shrink: 0;
}
.fgs-modal-logo { font-size: 20px; font-weight: 800; font-style: italic; }
.fgs-logo-full  { color: #c0392b; }
.fgs-logo-sports{ color: #555; font-style: italic; font-weight: 400; font-size: 16px; }

.fgs-modal-close {
    background: #f0f0f0;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.fgs-modal-close:hover { background: #ddd; }

/* ---- Body / Scroll ---- */
.fgs-modal-body {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* ---- Sections ---- */
.fgs-section {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
}
.fgs-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin: 0 0 14px 0;
    padding: 0;
}

/* ---- Fields ---- */
.fgs-field { margin-bottom: 12px; }
.fgs-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}
.fgs-req { color: #c0392b; }

.fgs-field input[type="text"],
.fgs-field input[type="email"],
.fgs-field input[type="tel"],
.fgs-field textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
    outline: none;
}
.fgs-field input:focus,
.fgs-field textarea:focus { border-color: #c0392b; }
.fgs-field textarea { resize: vertical; }

/* ---- Toggle Buttons ---- */
.fgs-toggle-group { display: flex; gap: 10px; margin-bottom: 14px; }
.fgs-toggle {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
}
.fgs-toggle.active {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}
.fgs-toggle:hover:not(.active) { border-color: #c0392b; color: #c0392b; }

/* ---- Quantity ---- */
.fgs-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.fgs-qty-row label { font-size: 14px; font-weight: 600; color: #444; }
.fgs-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 25px;
    padding: 4px 10px;
}
.fgs-qty-btn {
    background: none;
    border: 1.5px solid #ccc;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}
.fgs-qty-btn:hover { border-color: #c0392b; color: #c0392b; }
#fgs-qty-display { font-weight: 700; font-size: 16px; min-width: 24px; text-align: center; }
.fgs-qty-unit { font-size: 13px; color: #888; }

/* ---- Upload Zones ---- */
.fgs-upload-zone {
    display: block;
    border: 2px dashed #c0392b;
    background: #fff5f5;
    border-radius: 8px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}
.fgs-upload-zone:hover { background: #ffe8e8; }
.fgs-upload-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fgs-upload-icon { font-size: 32px; }
.fgs-upload-text { color: #c0392b; font-weight: 600; font-size: 14px; }
.fgs-upload-zone img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    border-radius: 6px;
}

/* ---- Canvas Tools ---- */
.fgs-canvas-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.fgs-tool {
    padding: 7px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
}
.fgs-tool.active { background: #c0392b; border-color: #c0392b; color: #fff; }
.fgs-tool:hover:not(.active) { border-color: #c0392b; color: #c0392b; }
.fgs-tool-clear {
    border-color: #c0392b;
    color: #c0392b;
}
.fgs-tool-clear:hover { background: #c0392b; color: #fff; }

/* ---- Canvas Options ---- */
.fgs-canvas-options {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.fgs-color-label, .fgs-size-label { font-size: 13px; font-weight: 600; color: #444; }
.fgs-colors { display: flex; gap: 6px; }
.fgs-color {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    padding: 0;
}
.fgs-color.active { border-color: #222; transform: scale(1.15); }
.fgs-color:hover  { transform: scale(1.1); }
.fgs-range {
    flex: 1;
    max-width: 100px;
    accent-color: #c0392b;
}

/* ---- Canvas Wrapper ---- */
.fgs-canvas-wrap {
    position: relative;
    width: 100%;
    border: 1.5px dashed #ccc;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
}
#fgs-annotation-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
    touch-action: none;
}
.fgs-canvas-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 13px;
    pointer-events: none;
    user-select: none;
}

/* ---- Text Input for Text Tool ---- */
.fgs-text-field {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #c0392b;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

/* ---- Submit ---- */
.fgs-submit-wrap { border: none; background: transparent; padding: 0; }
.fgs-submit-btn {
    width: 100%;
    padding: 14px;
    background: #c0392b;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}
.fgs-submit-btn:hover { background: #a93226; transform: translateY(-1px); }
.fgs-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* ---- Success Message ---- */
.fgs-success {
    text-align: center;
    padding: 40px 20px;
}
.fgs-success-icon { font-size: 60px; margin-bottom: 16px; }
.fgs-success h3 { font-size: 22px; color: #2e7d32; margin: 0 0 10px 0; }
.fgs-success p  { color: #666; margin: 0 0 24px 0; }

/* ---- Error Highlight ---- */
.fgs-field input.fgs-error,
.fgs-field textarea.fgs-error { border-color: #e53935; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .fgs-modal-body { padding: 14px; }
    .fgs-section { padding: 14px; }
    .fgs-canvas-options { gap: 6px; }
    .fgs-range { max-width: 70px; }
}
