/* =====================================================
   Eid Greeting Card Plugin – Stylesheet v1.1
   ===================================================== */

.eid-wrap {
    max-width: 960px;
    margin: 30px auto;
    padding: 20px;
    font-family: 'Cairo', 'Arial', sans-serif;
    text-align: center;
}

.eid-heading {
    font-size: 1.8rem;
    color: #9a7f00;
    margin-bottom: 8px;
    font-weight: 700;
}

.eid-sub {
    color: #777;
    margin-bottom: 24px;
    font-size: 1rem;
}

/* ---- Step 1: card grid ---- */
.eid-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.eid-card-col {
    flex: 1 1 28%;
    min-width: 200px;
    max-width: 300px;
}

.eid-card-col a {
    display: block;
    text-decoration: none;
}

.eid-card-img {
    width: 100%;
    border-radius: 8px;
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
    display: block;
}

.eid-card-img:hover {
    border-color: #d1b740;
    transform: scale(1.03);
}

.eid-card-label {
    display: block;
    margin-top: 8px;
    color: #555;
    font-size: 0.95rem;
}

/* ---- Step 2: selected card preview + crosshair ---- */
.eid-preview-wrap {
    position: relative;
    margin: 0 auto 20px;
    max-width: 380px;
    display: inline-block;
}

.eid-preview-img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

/* Transparent overlay — captures all clicks/drags on the preview image */
.eid-drag-overlay {
    position: absolute;
    inset: 0;
    cursor: crosshair;
    z-index: 10;
    border-radius: 10px;
    -webkit-user-drag: none;
}

.eid-drag-overlay.eid-overlay-active {
    cursor: crosshair;
}

/* Hint below preview image */
.eid-drag-hint {
    font-size: 0.8rem;
    color: #9a7f00;
    margin: 4px 0 16px;
    text-align: center;
}

/* Crosshair — visual only, sits above overlay */
.eid-crosshair {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
    z-index: 11;
}

/* Cross lines */
.eid-crosshair::before,
.eid-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255,255,255,0.85);
}

.eid-crosshair::before {
    width: 24px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.eid-crosshair::after {
    width: 2px;
    height: 24px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.eid-crosshair-label {
    display: block;
    margin-top: 14px;
    font-size: 0.8rem;
    font-family: 'Cairo', 'Arial', sans-serif;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
    transition: font-size 0.1s;
}

/* ---- Sliders ---- */
.eid-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e0d9c0;
    outline: none;
    cursor: pointer;
    margin: 6px 0 4px;
}

.eid-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #9a7f00;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    transition: background 0.2s;
}

.eid-slider::-webkit-slider-thumb:hover {
    background: #d1b740;
}

.eid-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #9a7f00;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.eid-slider-val {
    float: left;
    font-size: 0.8rem;
    color: #9a7f00;
    font-weight: 700;
    margin-right: 6px;
}

.eid-slider-ends {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 2px;
}

/* ---- Step 2: form ---- */
.eid-form-wrap {
    background-color: #fdf9ee;
    border-radius: 12px;
    padding: 32px 28px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: right;
}

.eid-field {
    margin-bottom: 20px;
}

.eid-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 0.95rem;
}

.eid-input,
.eid-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Arial', sans-serif;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.eid-input:focus,
.eid-select:focus {
    outline: none;
    border-color: #d1b740;
    box-shadow: 0 0 0 3px rgba(209,183,64,0.18);
}

/* ---- Colour picker row ---- */
.eid-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.eid-color-picker {
    width: 52px;
    height: 44px;
    padding: 2px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    flex-shrink: 0;
}

.eid-color-picker:focus {
    outline: none;
    border-color: #d1b740;
}

.eid-color-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.eid-preset-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ccc;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    padding: 0;
}

.eid-preset-swatch:hover {
    transform: scale(1.2);
    border-color: #9a7f00;
}

.eid-preset-swatch.active {
    border-color: #9a7f00;
    border-width: 3px;
    transform: scale(1.15);
}

/* White swatch needs a visible border */
.eid-preset-swatch[data-color="#ffffff"] {
    border-color: #bbb;
}

/* ---- Buttons ---- */
.eid-btn {
    width: 100%;
    padding: 14px 20px;
    margin-top: 10px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cairo', 'Arial', sans-serif;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: background-color 0.2s, transform 0.1s;
}

.eid-btn:active {
    transform: scale(0.98);
}

.eid-btn-download {
    background-color: #9a7f00;
    color: #ffffff;
    margin-top: 24px;
}

.eid-btn-download:hover {
    background-color: #d1b740;
}

.eid-btn-back {
    background-color: #ececec;
    color: #444;
}

.eid-btn-back:hover {
    background-color: #d5d5d5;
}

/* ---- Preview button ---- */
.eid-btn-preview {
    background-color: #1a5276;
    color: #ffffff;
    margin-top: 24px;
}

.eid-btn-preview:hover {
    background-color: #2e86c1;
}

.eid-btn-preview:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* ---- Result area ---- */
.eid-result-wrap {
    max-width: 600px;
    margin: 28px auto 0;
    text-align: center;
}

.eid-result-title {
    font-size: 1.2rem;
    color: #9a7f00;
    margin-bottom: 14px;
    font-weight: 700;
}

.eid-result-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    border: 3px solid #d1b740;
    display: block;
}

.eid-result-hint {
    margin-top: 12px;
    font-size: 0.88rem;
    color: #777;
}

/* ---- Loading spinner ---- */
.eid-result-loading {
    padding: 30px 0;
    color: #888;
}

.eid-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0d9c0;
    border-top-color: #9a7f00;
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: eid-spin 0.8s linear infinite;
}

@keyframes eid-spin {
    to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .eid-card-col {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .eid-heading {
        font-size: 1.4rem;
    }

    .eid-form-wrap {
        padding: 20px 16px;
    }
}
