.aptb{max-width:100%;margin:0 auto;font-size:16px}
.aptb *{box-sizing:border-box}
.aptb-search{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;padding:16px;border:1px solid #ddd;border-radius:10px;background:#fafafa}
.aptb-search label,.aptb-form label{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:600}
.aptb-search input,.aptb-form input,.aptb-form textarea{padding:8px 10px;border:1px solid #ccc;border-radius:6px;font:inherit;font-weight:400;width:100%}
.aptb-search input[type=number]{width:90px}
.aptb-search label.aptb-inline{flex-direction:row;align-items:center;font-weight:400;padding-bottom:10px}
.aptb-search label.aptb-inline input{width:auto}
.aptb-btn{background:#374b5d;color:#fff;border:0;border-radius:6px;padding:10px 20px;font:inherit;font-weight:600;cursor:pointer}
.aptb-btn:hover{background:#155545}
.aptb-btn:disabled{opacity:.6;cursor:wait}
.aptb-link{background:none;border:0;color:#555;text-decoration:underline;cursor:pointer;font:inherit}
#aptb-results{margin-top:20px;display:grid;gap:16px}
.aptb-card{display:flex;flex-wrap:wrap;border:1px solid #ddd;border-radius:10px;overflow:hidden;background:#fff}
.aptb-card img{width:280px;max-width:100%;object-fit:cover;flex:0 0 auto}
.aptb-body{flex:1 1 300px;padding:16px}
.aptb-body h3{margin:0 0 8px}
.aptb-price{list-style:none;margin:12px 0;padding:0}
.aptb-price li{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px dashed #e5e5e5}
.aptb-price .aptb-total{font-weight:700;border-bottom:0;font-size:1.1em}
.aptb-form{display:grid;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid #eee}
.aptb-hp{position:absolute!important;left:-9999px!important}
.aptb-notice{padding:12px 16px;border-radius:8px;background:#eef4ff}
.aptb-error{background:#fdecec;color:#8a1f1f}
.aptb-success{background:#e8f6ee;color:#14532d}
.aptb-rangewrap{position:relative;flex:1 1 280px}
.aptb-rangewrap input[type=text]{cursor:pointer;background:#fff}
.aptb-cal{position:absolute;z-index:50;top:calc(100% + 6px);left:0;background:#fff;border:1px solid #ddd;border-radius:10px;box-shadow:0 8px 28px rgba(0,0,0,.15);padding:14px;max-width:calc(100vw - 32px)}
.aptb-cal[hidden]{display:none}
.aptb-cal-nav{display:flex;justify-content:space-between;position:absolute;left:14px;right:14px;top:14px;pointer-events:none}
.aptb-cal-nav button{pointer-events:auto;background:none;border:0;font-size:24px;line-height:1;cursor:pointer;padding:0 8px;color:#333}
.aptb-months{display:flex;gap:28px}
.aptb-month{width:238px}
.aptb-mtitle{text-align:center;font-weight:700;margin-bottom:8px;text-transform:capitalize}
.aptb-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.aptb-wd{text-align:center;font-size:11px;color:#777;padding:4px 0;text-transform:uppercase}
.aptb-day{aspect-ratio:1;border:0;background:none;border-radius:6px;font:inherit;font-size:14px;cursor:pointer;color:#222;padding:0}
.aptb-day:hover:not(:disabled){background:#e8f6ee}
.aptb-day.is-off{color:#bbb;cursor:not-allowed;text-decoration:line-through}
.aptb-day.is-mid{background:#d9efe6;border-radius:0}
.aptb-day.is-start,.aptb-day.is-end{background:#1d6f5c;color:#fff}
.aptb-cal-foot{text-align:center;margin-top:10px;font-size:14px;color:#555}

/* Availability calendar */
.aptb-calendar{border:1px solid #ddd;border-radius:10px;padding:14px;background:#fff}
.aptb-cal-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.aptb-cal-title{font-size:1.15em;text-transform:capitalize}
.aptb-cal-nav2,.aptb-cal-views{display:flex;gap:4px}
.aptb-cal-bar button{background:#f3f3f3;border:1px solid #ddd;border-radius:6px;padding:6px 12px;font:inherit;cursor:pointer;color:#222}
.aptb-cal-bar button:hover{background:#e8f6ee}
.aptb-cal-views button.is-on{background:#1d6f5c;border-color:#1d6f5c;color:#fff}
.aptb-tl-wrap{overflow-x:auto}
.aptb-tl{border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed}
.aptb-tl th,.aptb-tl td{padding:0}
.aptb-tl .aptb-tl-name{position:sticky;left:0;z-index:2;background:#fff;text-align:left;font-weight:600;font-size:14px;width:140px;min-width:140px;padding:0 10px 0 0;border-bottom:1px solid #eee;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aptb-tl-h{text-align:center;font-weight:400;padding:2px 0;border-bottom:1px solid #ddd}
.aptb-tl-h small{display:block;font-size:10px;color:#777;text-transform:uppercase}
.aptb-tl-h b{font-size:12px}
.aptb-tl.is-month .aptb-tl-h{min-width:26px}
.aptb-tl.is-week .aptb-tl-h b{font-size:15px}
.aptb-tl-h.we{background:#f6f6f6}
.aptb-tl-h.today{background:#fff4cc}
.aptb-c{height:34px;border-bottom:1px solid #fff;border-right:1px solid #fff;background:#dff2e7}
.aptb-tl.is-week .aptb-c{height:44px}
.aptb-c.bk,.sw.bk{background:#d2625f}
.aptb-c.am,.sw.am{background:linear-gradient(90deg,#d2625f 50%,#dff2e7 50%)}
.aptb-c.pm,.sw.pm{background:linear-gradient(90deg,#dff2e7 50%,#d2625f 50%)}
.sw.fr{background:#dff2e7}
.aptb-c.past{opacity:.45}
.aptb-c.today{box-shadow:inset 0 0 0 2px #e0b400}
.aptb-cal-legend{display:flex;flex-wrap:wrap;gap:16px;margin-top:12px;font-size:13px;color:#555}
.aptb-cal-legend span{display:inline-flex;align-items:center;gap:6px}
.sw{display:inline-block;width:18px;height:14px;border-radius:3px;border:1px solid #ccc}
.aptb-notes{margin:6px 0 0 18px;padding:0}
.aptb-info{background:#fff8e1;margin-top:12px}

/* Month grid with free apartments per day */
.aptb-dg{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.aptb-dg-wd{text-align:center;font-size:12px;color:#777;text-transform:uppercase;padding:4px 0}
.aptb-dg-cell{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;min-height:64px;padding:6px 8px;border:1px solid #d3e8dc;border-radius:8px;font:inherit;cursor:pointer;text-align:left;color:#222}
.aptb-dg-cell b{font-size:14px}
.aptb-dg-cell span{font-size:11px;color:#444}
.dg-all,.sw.dg-all{background:#dff2e7}
.dg-some,.sw.dg-some{background:#fff1cc}
.dg-none,.sw.dg-none{background:#f4d3d2}
.aptb-dg-cell.dg-some{border-color:#ecd48a}
.aptb-dg-cell.dg-none{border-color:#e6aaa8}
.aptb-dg-cell:hover:not(:disabled){filter:brightness(.96)}
.aptb-dg-cell.out{opacity:.45}
.aptb-dg-cell.past{opacity:.35;cursor:not-allowed}
.aptb-dg-cell.today{box-shadow:inset 0 0 0 2px #e0b400}
.aptb-dg-cell.sel{outline:2px solid #1d6f5c;outline-offset:1px}
.aptb-dg-panel{margin-top:14px}
.aptb-dg-panel h4{margin:0 0 8px}
.aptb-dg-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.aptb-dg-list li{background:#e8f6ee;border:1px solid #bfe0cd;border-radius:999px;padding:6px 14px;font-size:14px}
@media(max-width:600px){.aptb-dg-cell{min-height:52px;padding:4px}.aptb-dg-cell span{font-size:10px}}

/* Closed (not open for booking) and date selection in calendars */
.aptb-c.cl,.sw.cl{background:repeating-linear-gradient(45deg,#efefef,#efefef 4px,#dedede 4px,#dedede 8px)}
.aptb-c.am.cl{background:linear-gradient(90deg,#d2625f 50%,#e3e3e3 50%)}
.aptb-c{position:relative}
.aptb-c:not(.past){cursor:pointer}
.aptb-c.sels::after,.aptb-c.selm::after,.aptb-c.sele::after{content:"";position:absolute;top:5px;bottom:5px;background:rgba(29,111,92,.75)}
.aptb-c.sels::after{left:50%;right:0;border-radius:10px 0 0 10px}
.aptb-c.selm::after{left:0;right:0}
.aptb-c.sele::after{left:0;right:50%;border-radius:0 10px 10px 0}
.aptb-hint{font-size:13px;color:#666;margin:10px 0 0}
.aptb-sel-panel,.aptb-dg-panel{margin-top:14px}
.aptb-sp{border-top:1px solid #eee;padding-top:14px}
.aptb-sp-head{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:10px}
.aptb-sp-opts{display:flex;flex-wrap:wrap;gap:16px;align-items:center;margin-bottom:12px}
.aptb-sp-opts label{display:flex;gap:6px;align-items:center;font-size:14px}
.aptb-sp-opts input[type=number]{width:70px;padding:6px 8px;border:1px solid #ccc;border-radius:6px}
.aptb-sp-opts input[type=text]{border-radius:6px}
.aptb-sp-res{display:grid;gap:16px}
.aptb-dg-cell.rs,.aptb-dg-cell.re{box-shadow:inset 0 0 0 3px #1d6f5c}
.aptb-dg-cell.rm{box-shadow:inset 0 0 0 2px #7fbfa9}
.aptb-body p{white-space:pre-line}

/* Year view */
.aptb-yr-bar{margin-bottom:10px}
.aptb-yr-bar select{padding:6px 10px;border:1px solid #ccc;border-radius:6px;font:inherit}
.aptb-tl.is-year{min-width:780px}
.aptb-tl.is-year .aptb-tl-name{width:56px;min-width:56px;padding-right:6px;text-transform:capitalize}
.aptb-tl.is-year .aptb-tl-h{padding:3px 0}
.aptb-tl.is-year .aptb-tl-h b{font-size:11px;color:#555}
.aptb-tl.is-year .aptb-c{height:28px;min-width:20px}
.aptb-tl.is-year .aptb-x{background:#f7f7f7}

/* [apt_prices] */
.aptb-prices{margin:16px 0}
.aptb-pt-wrap{overflow-x:auto}
.aptb-pt{border-collapse:collapse;width:100%}
.aptb-pt th,.aptb-pt td{padding:8px 10px;border-bottom:1px solid #e5e5e5;text-align:left;vertical-align:top}
.aptb-pt thead th{background:#f6f6f6;font-size:13px}
.aptb-fees{margin:10px 0 0 18px}
.aptb-offers{margin:10px 0 0}

/* Year planner (weekday letters on top, day numbers inside the cells) */
.aptb-tl.is-year{min-width:900px}
.aptb-tl.is-year .aptb-tl-h{padding:2px 0}
.aptb-tl.is-year .aptb-tl-h small{font-size:10px;color:#666}
.aptb-tl.is-year .aptb-c{font-size:10px;text-align:center;vertical-align:middle;color:#2b4a3d;padding:0}
.aptb-tl.is-year .aptb-c.bk{color:#fff}

/* Prevent iOS zoom on focus: form controls must be at least 16px */
.aptb input[type=text],
.aptb input[type=email],
.aptb input[type=tel],
.aptb input[type=number],
.aptb input[type=date],
.aptb select,
.aptb textarea { font-size: 16px; }
.aptb-search label,
.aptb-form label { font-size: 16px; }

/* Price details */
.aptb-may{margin:8px 0 12px;font-size:13px;color:#555}
.aptb-may ul{margin:4px 0 0 18px;padding:0}

/* PayPal */
.aptb-pay{margin-top:16px;padding:16px;border:1px solid #ddd;border-radius:10px;background:#fafafa}
.aptb-pay h3{margin:0 0 8px}
.aptb-pp{max-width:420px;margin:12px 0}

@media (max-width: 768px) {
	.aptb-tl {
		table-layout:auto;
	}
	.aptb-tl .aptb-tl-name {
		font-size: 10px;
		width: 100px;
		min-width: 100px;		
	}
}
