/* General Body and Container Styles */
/* ============================= */
/* STEP 1 – FOOD CATEGORY */
/* ============================= */

/* ============================= */
/* FOOD CATEGORY BUTTON – FULL WIDTH */
/* ============================= */

.fd-category-select {
    width: 100%;
    margin-bottom: 24px;
}
.emoji-orange {
    width: 18px;
    height: 18px;
    margin-left: 6px;   /* RTL spacing */
    vertical-align: middle;
    filter: hue-rotate(15deg) saturate(1.3) brightness(1.05);
}

.fd-category-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 14px 18px;

    border: 2px solid #d6d6d6;
    border-radius: 14px;

    background: #ffffff;
    color: #222;

    font-size: 16px;
    font-weight: 600;

    cursor: default;
}

/* icon spacing (🍽️) */
.fd-category-btn span,
.fd-category-btn {
    gap: 8px;
}

/* ACTIVE (selected food) */
.fd-category-btn.active {
   border-color: #f8ab53;
    background: #FFF9EC;
}

/* ============================= */
/* STEP 1 – PRESET GRID */
/* ============================= */

.fd-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 15px;
}

/* CARD */
.fd-preset-box {
    position: relative;
    border: 2px solid #f8ab53;
    border-radius: 14px;
    padding: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
}

/* HIDE RADIO */
.fd-preset-box input[type="radio"] {
    display: none;
}

/* IMAGE */
.fd-preset-box img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* TITLE */
.fd-preset-box h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 6px 0;
    color: #111;
}

/* DESCRIPTION */
.fd-preset-box p {
    font-size: 14px;
    line-height: 1.45;
    color: #555;
    margin: 0;
}

/* HOVER */
.fd-preset-box:hover {
    border-color: #bdbdbd;
    background: #fafafa;
}

/* SELECTED STATE */
.fd-preset-box input[type="radio"]:checked + img,
.fd-preset-box input[type="radio"]:checked ~ h4,
.fd-preset-box input[type="radio"]:checked ~ p {
    opacity: 1;
}

.fd-preset-box input[type="radio"]:checked ~ * {
    pointer-events: none;
}

.fd-preset-box:has(input[type="radio"]:checked) {
   border-color: #f8ab53;
    background: #FFF9EC;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}
/* ============================= */
/* STEP 3 – VISUAL POLISH */
/* ============================= */

#fd-step-3 {
    max-width: 720px;
    margin: 0 auto;
}

/* Header spacing */
#fd-step-3 .fd-form-header {
    margin-bottom: 26px;
}

/* Field wrapper */
#fd-step-3 .fd-field {
    margin-bottom: 22px;
}

/* Labels */
#fd-step-3 label {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    display: block;
}

/* Dropdown base */
#fd-step-3 select {
     background-color: #FFF9EC;
    border: 2px solid #f8ab53 ! important;
    border-radius: 14px;
  padding: 16px 20px;        /* more inner space */
    min-height: 54px;   
    box-shadow: 
        0 1px 2px rgba(0,0,0,0.04),
        0 4px 10px rgba(0,0,0,0.06);

    transition: all 0.25s ease;
}

/* Hover */
#fd-step-3 select:hover {
    background-color: #FFF9EC;
    border: 2px solid #f8ab53 ! important;
}

/* Focus (active field like screenshot) */
#fd-step-3 select:focus {
    background-color: #FFF9EC;
    border: 2px solid #f8ab53 ! important;

    box-shadow:
        0 0 0 3px rgba(0,0,0,0.05),
        0 6px 16px rgba(0,0,0,0.08);
}

/* Placeholder option */
#fd-step-3 select option[value=""] {
    color: #999;
}

/* Space before buttons */
#fd-step-3 + .fd-step-actions,
.fd-step-actions {
    margin-top: 34px;
}

/* ============================= */
/* MOBILE */
/* ============================= */

@media (max-width: 768px) {
    .fd-preset-grid {
        grid-template-columns: repeat(2, 2fr) ! important;
    }
}



button.fd-choice-btn.active {
    background: orange;
    color: white ! important;
    border: 1px solid white;
}
#fd-confirm-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
}

/* Aspect Ratio Button Styling (New for Step 1) */
.fd-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.fd-ratio-btn {
    background: #fff;
    border: 2px solid #ddd;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    text-align: right;
    transition: all 0.3s ease;
    width: 100%;
}

.fd-ratio-btn:hover {
    border-color: #f8ab53;
}

.fd-ratio-btn.active {
    border-color: #f8ab53;
    background-color: #fff9f2;
    box-shadow: 0 0 10px rgba(248, 171, 83, 0.2);
}

input#fd-phone {
    direction: rtl !important;
}

.fd-btn-generate {
    background-color: #f8ab53 !important;
    color: black !important;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    justify-content: center;
    padding-top: 50px;
    margin: 0;
    min-height: 100vh;
}

.fd-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
    box-sizing: border-box;
    direction: rtl; /* Ensure Hebrew is right-to-left */
}

/* Form Steps Progress Bar */
.fd-form-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    padding: 0 10%;
}

.fd-form-step {
    flex: 1;
    text-align: center;
    color: #ccc;
    position: relative;
    z-index: 1;
}

.fd-form-step .fd-circle {
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    background-color: #ccc;
    color: #fff;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.fd-form-step.active .fd-circle {
    background-color: #f8ab53 !important;
    transform: scale(1.1);
}

.fd-form-step.completed .fd-circle {
    background-color: #f8ab53 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Progress line */
.fd-form-steps::before {
    content: '';
    position: absolute;
    top: 17px;
    left: 10%;
    right: 10%;
    height: 4px;
    background-color: #eee;
    z-index: 0;
}

/* Form Content and Fields */
.fd-form-content {
    display: none;
    padding: 20px 0;
}

.fd-form-content.active {
    display: block;
}

.fd-form-header {
    text-align: center;
    color: #ff9a68;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.fd-form-group {
    margin-bottom: 25px;
}

.fd-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.fd-form-input,
.fd-form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.fd-form-input:focus,
.fd-form-textarea:focus {
    border-color: #f8ab53;
    box-shadow: 0 0 0 3px rgba(248, 171, 83, 0.25);
    outline: none;
}

/* Navigation Buttons */
.fd-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.fd-button {
    padding: 14px 28px !important;
    border: none !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    flex-grow: 1 !important;
    text-align: center !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    text-decoration: none !important;
}

.fd-btn-prev {
    background-color: #e6dccf !important;
    color: #333 !important;
}

.fd-btn-next {
    background-color: #f9a84d !important;
    color: #fff !important;
}

/* History and Results */
#fd-final-generated-output {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    min-height: 250px;
    white-space: pre-wrap;
}

.fd-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Spinner Animation */
@keyframes fd-spin {
    to { transform: rotate(360deg); }
}

.fd-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #f8ab53;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: fd-spin 1s linear infinite;
}

/* Status Messages */
.fd-status-message {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.fd-status-message.fd-success {
    background-color: #d4edda;
    color: #155724;
}

.fd-status-message.fd-error {
    background-color: #f8d7da;
    color: #721c24;
}