/* =======================================================
   Allenby Sea Report — report.css
   Layout + Full Styling
======================================================= */

/* ── מיכל ראשי: שני טורים זה לצד זה (RTL) ──── */
.asr-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    direction: rtl;
    max-width: 100%;
    box-sizing: border-box;
}

/* ── שני הטורים ──────────────────────────────── */
.asr-wrap .form,
.asr-wrap .preview {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* ביטול float חיצוני (WP/Elementor) */
.asr-wrap .preview {
    float: none !important;
}

/* ── כותרת ───────────────────────────────────── */
.asr-wrap h1 {
    text-align: center;
    font-size: 24px;
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* ── מקטעי טופס ──────────────────────────────── */
.asr-wrap .form-section {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asr-wrap .morning-section {
    background-color: #e6f7ff;
    border-color: #b3e0ff;
}

/* ── שורת שדה (תווית + קלט) ─────────────────── */
.asr-wrap .field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.asr-wrap .field-row > span {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    width: 120px;
}

/* ── שדות גובה גל ────────────────────────────── */
#wavesMorning,
#wavesNoon {
    flex-grow: 0.5;
    max-width: 100px;
}

/* ── כפתורי יחידות מידה ──────────────────────── */
.asr-wrap .unit-buttons {
    display: flex;
    flex-direction: row;
    gap: 5px;
    flex-shrink: 0;
    align-items: center;
    flex-grow: 1;
}

.asr-wrap .unit-buttons button,
.asr-wrap .unit-toggle {
    width: 50px;
    padding: 6px 4px;
    background: #ccc;
    color: #333;
    font-size: 12px;
    font-weight: normal;
    border-radius: 4px;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.asr-wrap .unit-buttons button.active,
.asr-wrap .unit-toggle.active {
    background: #007bff;
    color: white;
}

/* ── קלטים ───────────────────────────────────── */
.asr-wrap input,
.asr-wrap select,
.asr-wrap textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.asr-wrap input:focus,
.asr-wrap select:focus,
.asr-wrap textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 1px #007bff;
}

.asr-wrap textarea { resize: vertical; }

/* ── כפתורי תגיות (פעילויות) ─────────────────── */
.asr-wrap .tags {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 5px;
}

.asr-wrap .tags button {
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 6px 12px;
    background: #f0f0f0;
    cursor: pointer;
    color: #222;
    transition: 0.2s;
    font-size: 13px;
    flex-shrink: 0;
    display: inline-block !important;
    width: auto !important;
    margin: 0;
}

.asr-wrap .tags button:hover { background: #e0e0e0; }

.asr-wrap .tags button.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

/* ── סרגל עריכת טקסט ─────────────────────────── */
.asr-wrap .editor-toolbar {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #f0f4f8;
    border-radius: 6px 6px 0 0;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    align-items: center;
}

.asr-wrap .editor-toolbar button {
    width: auto;
    padding: 6px 10px;
    background: #e9ecef;
    color: #333;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid #ccc;
    box-shadow: none;
}

.asr-wrap .editor-toolbar button:hover {
    background: #dee2e6;
    transform: none;
}

/* עיצובים בתוך contenteditable */
#previewBox b, #previewBox strong { font-weight: 700; }
#previewBox i, #previewBox em    { font-style: italic; }
#previewBox del, #previewBox s   { text-decoration: line-through; }

/* ── כפתורים כלליים ──────────────────────────── */
.asr-wrap button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
}

.asr-wrap button:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* ── תיבת תצוגה מקדימה — עטיפת וואטסאפ ───────── */
.wa-phone {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    direction: ltr;
}

.wa-topbar {
    background: #075E54;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.wa-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.wa-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.wa-body {
    background: #E5DDD5;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    direction: rtl;
}

/* ── תיבת previewBox בתוך בועת וואטסאפ ─────────── */
#previewBox {
    background: #fff;
    border-radius: 0 12px 12px 12px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.7;
    color: #111;
    min-height: 300px;
    white-space: pre-wrap;
    cursor: text;
    user-select: text;
    position: relative;
    border: none;
    outline: none;
    direction: rtl;
}

/* הזנב של הבועה */
#previewBox::before {
    content: "";
    position: absolute;
    top: 0;
    right: 100%;
    border: 7px solid transparent;
    border-top-color: #fff;
    border-right-color: #fff;
}

#previewBox:focus {
    box-shadow: inset 0 0 0 2px rgba(0,123,255,0.3);
}

/* חותמת שעה בסגנון וואטסאפ */
.wa-timestamp {
    font-size: 11px;
    color: #999;
    text-align: left;
    margin-top: 6px;
    direction: ltr;
}

.wa-inputbar {
    background: #F0F0F0;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #ddd;
    direction: ltr;
}

.wa-textbox {
    flex: 1;
    background: #fff;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    color: #aaa;
    border: 1px solid #ddd;
}

.wa-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: default;
    /* מבטל את override של .asr-wrap button */
    width: 36px !important;
    padding: 0 !important;
}

.wa-send svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* ── הודעת העתקה קופצת ────────────────────────── */
#asr-message-box {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    font-size: 16px;
}

/* ── מובייל ───────────────────────────────────── */
@media (max-width: 768px) {
    .asr-wrap                      { flex-direction: column; }
    .asr-wrap .form,
    .asr-wrap .preview             { min-width: 100%; }
    .asr-wrap .field-row > span    { width: auto; min-width: 90px; }
    .asr-wrap .unit-buttons button { width: 45%; }
    .asr-wrap .unit-buttons        { flex-direction: row; justify-content: space-between; }
    .asr-wrap .editor-toolbar      { flex-wrap: wrap; justify-content: center; }
}
.wa-phone .wa-inputbar {
display: none;
}