:root {
    --ale-orange: #e88224;
    --ale-border: #cccccc;
    --ale-text: #666666;
    --ale-bg-light: #f9fafb;
}

/* Wrapper — zero padding, Elementor controls outer spacing */
.ale-wrapper { padding: 0; display: flex; justify-content: center; font-family: 'Segoe UI', sans-serif; }
.ale-card { width: 100%; max-width: 500px; background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.ale-title { font-size: 24px; font-weight: 800; margin: 0; color: #0a2540; }

/* Header row with title + action buttons */
.ale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 8px;
}
.ale-header-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.ale-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    width: 30px;
    height: 30px;
    border: 1.5px solid #e0e5ee;
    border-radius: 6px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.15s ease;
    justify-content: center;
}
.ale-action-btn:hover {
    border-color: var(--ale-orange);
    color: var(--ale-orange);
    background: #fff8f2;
}
.ale-action-btn svg {
    flex-shrink: 0;
}
/* PDF btn subtle highlight */
#ale_pdf_btn:hover {
    border-color: #e88224;
    color: #e88224;
}
#ale_share_btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #f0f6ff;
}

label { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #555; margin-bottom: 5px; }

/* ── Info Tip Badge — inline beside Distance (Mi) label text ── */
.ale-dist-item {
    position: relative;
}
.ale-info-tip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--ale-orange); color: #fff;
    font-size: 7px; font-weight: 900; cursor: pointer;
    user-select: none; -webkit-user-select: none;
    outline: none; line-height: 1;
    flex-shrink: 0;
    vertical-align: middle;
    margin-top: -1px;
    position: relative; /* tooltip is child of this */
}

/* Tooltip popup — anchored to ? icon, opens upward */
.ale-tooltip-box {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 216px;
    background: linear-gradient(135deg, #1a2b42 0%, #243850 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    line-height: 1.6;
    padding: 9px 12px 9px 12px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
    z-index: 300;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.08);
}
/* first line bold */
.ale-tooltip-box strong {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 3px;
    color: #f0a050;
}
/* caret pointing down toward the ? icon */
.ale-tooltip-box::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%; transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #243850;
    border-bottom: none;
}
/* show ONLY on ? icon hover or click — NOT on full dist-item hover */
.ale-info-tip:hover .ale-tooltip-box,
.ale-info-tip.active .ale-tooltip-box { display: block; }

/* Uniform Input Styling */
input, .ale-custom-select, .ale-options-display {
    width: 100%; height: 42px; border: 1px solid var(--ale-border);
    border-radius: 5px; padding: 0 10px; font-size: 14px; color: #444;
    box-sizing: border-box;
}

/* Cabin Price placeholder smaller text */
#ale_price::placeholder { font-size: 14px; color: #bbb; font-weight: 400; }

/* Row 1: Price + Fetch */
.ale-combo-row { display: flex; gap: 8px; position: relative; margin-bottom: 15px; }
.ale-combo-row input { flex: 1; }
#ale_fetch_btn {
    background: var(--ale-orange); color: #fff; border: none;
    border-radius: 5px; padding: 0 15px; font-weight: 700; cursor: pointer; white-space: nowrap;
}

/* Row 2: Upgrade Options */
.ale-field { margin-bottom: 12px; }

/* Upgrade Options — custom dropdown matching Fetch Cabin style */
.ale-options-wrap {
    position: relative; width: 100%;
}
.ale-options-display {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; cursor: pointer;
}
.ale-options-display span:first-child {
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 14px; color: #444;
}
.ale-options-list {
    position: absolute; top: 44px; left: 0; width: 100%;
    background: #fff; border: 1px solid var(--ale-border); border-radius: 5px;
    display: none; z-index: 101; max-height: 200px; overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.ale-options-list.open { display: block; }

/* Row 3: 3-Column Grid */
.ale-inline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}

/* Custom "Select or Enter" Dropdowns (Down % / Months) */
.ale-custom-select { position: relative; padding: 0; display: flex; align-items: center; background: #fff; cursor: pointer; }
.ale-custom-select input { border: none !important; height: 100%; width: calc(100% - 25px); background: transparent; outline: none; }
.ale-select-arrow { width: 25px; text-align: center; color: #777; font-size: 9px; pointer-events: none; flex-shrink: 0; }

.ale-select-options {
    position: absolute; top: 44px; left: -1px; width: calc(100% + 2px);
    background: #fff; border: 1px solid var(--ale-border); border-radius: 5px;
    display: none; z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.ale-select-options.open { display: block; }
.ale-select-options div { padding: 8px 10px; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.ale-select-options div:last-child { border-bottom: none; }
.ale-select-options div:hover,
.ale-select-options div:active { background: #fef4eb; color: var(--ale-orange); }

/* Shared option row style — used by both Fetch Cabin & Upgrade Options */
.ale-option { padding: 10px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #eee; color: #444; }
.ale-option:last-child { border-bottom: none; }
.ale-option:hover, .ale-option:active { background: #f9f9f9; }

/* Fetch Product Dropdown */
.ale-dropdown {
    position: absolute; top: 45px; left: 0; width: 100%;
    background: #fff; border: 1px solid var(--ale-border); border-radius: 5px;
    display: none; z-index: 101; max-height: 200px; overflow-y: auto;
}

/* Results Split */
.ale-results-split { display: flex; background: var(--ale-bg-light); border: 1px solid #eef2f7; border-radius: 10px; margin-top: 10px; }
.ale-res-col { flex: 1; padding: 15px; display: flex; flex-direction: column; gap: 8px; }
.ale-res-left { border-right: 1px solid #ddd; }
.ale-res-line { display: flex; justify-content: space-between; font-size: 13px; color: #777; }
.ale-res-line strong { color: #333; }
.main-total strong { color: var(--ale-orange); font-size: 15px; }
.monthly-highlight strong { font-size: 18px; color: #10b981; }

.ale-submit-btn {
    width: 100%; height: 50px; background: #e88224 !important;
    color: #fff !important; border: none !important; border-radius: 8px; font-size: 18px; font-weight: 700; margin-top: 15px; cursor: pointer;
}
.ale-submit-btn:hover, .ale-submit-btn:focus, .ale-submit-btn:active {
    background: #d4741a !important;
    color: #fff !important;
    outline: none;
}
