.card { background: var(--card-bg); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); border: 1px solid var(--border-color); }
.card-title { font-size: 1.15rem; color: var(--primary); margin-bottom: 1.2rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }

.form-group { margin-bottom: 1.0rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.4rem; font-size: 0.9rem; color: var(--text-dark); }

.form-control { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border-color); border-radius: 6px; font-size: 1rem; outline: none; background-color: var(--bg-color); color: var(--text-dark); transition: all 0.2s ease-in-out; }
.form-control:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; box-shadow: 0 0 0 4px var(--focus-ring); } /* Fixed Focus Accessibility */

[data-theme="dark"] .form-control { background-color: #0f172a; color: #f8fafc; border-color: #334155; }

.custom-radio-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; padding: 0.5rem; background: var(--bg-color); border-radius: 6px; border: 1px solid var(--border-color); }
.radio-label, .checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; color: var(--text-dark); font-weight: 500; font-size: 0.95rem; }
.radio-label input[type="radio"], .checkbox-label input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); cursor: pointer; }
.exact-match-box { background: var(--bg-color); padding: 0.8rem; border-radius: 6px; border: 1px dashed var(--border-color); }

.plot-container { margin-bottom: 2rem; padding-top: 1rem; border-top: 1px dashed var(--border-color); }
.plot-list { list-style: none; }
.plot-item { background: var(--bg-color); border: 1px solid var(--border-color); padding: 0.75rem 1rem; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; }
.btn-remove { background: var(--danger); color: white; border: none; border-radius: 4px; padding: 0.3rem 0.6rem; cursor: pointer; transition: background 0.2s; }
.btn-remove:hover { background: #b91c1c; }

.smart-result-box { background: var(--smart-box-bg); border: 1px solid var(--smart-box-border); border-radius: 8px; text-align: left; padding: 1.5rem; transition: background 0.3s, border-color 0.3s; }
.smart-result-label { color: var(--smart-text); font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 0.4rem; }
.smart-result-value { color: var(--smart-value); font-size: 1.25rem; font-weight: 700; margin-top: 0.5rem; line-height: 1.5; }

.result-box { background: var(--bg-color); padding: 1rem; border-radius: 6px; border-left: 3px solid var(--accent); }
.result-box label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.result-box .value { font-size: 1.15rem; font-weight: 700; color: var(--primary); margin-top: 0.2rem; }

.highlight-box { background: var(--bg-color); border: 1px solid var(--border-color); padding: 1.2rem; border-radius: 6px; text-align: center; }
.highlight-box label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.highlight-box .total-cost { font-size: 1.75rem; font-weight: 700; margin-top: 0.3rem; }

.legal-box { background: var(--bg-color); padding: 1rem; border-radius: 6px; border: 1px solid var(--border-color); }
.legal-title { color: var(--accent) !important; font-weight: 600 !important; }

.cost-breakdown { background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 6px; padding: 1.2rem; }
.breakdown-row { display: flex; justify-content: space-between; padding: 0.4rem 0; font-size: 0.95rem; border-bottom: 1px dashed var(--border-color); }
.grand-total { font-weight: 700; color: var(--primary); font-size: 1.15rem; padding-top: 0.8rem; margin-top: 0.4rem; border-top: 2px solid var(--border-color); }

/* Buttons & Accessibility */
.btn { width: 100%; padding: 0.8rem; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.95rem; transition: transform 0.1s, opacity 0.2s, box-shadow 0.2s; outline: none; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px var(--focus-ring); }
.btn-primary { background-color: var(--accent); color: white; }
.btn-primary:hover { background-color: var(--accent-hover); }
.btn-secondary { background-color: var(--text-muted); color: white; }
.btn-success { background-color: var(--success); color: white; }
.btn-danger { background-color: var(--danger); color: white; }
.btn-whatsapp { background-color: #25D366; color: white; }
.btn-dark { background-color: #1e293b; color: white; }
.icon-btn { background: transparent; border: 1px solid rgba(255,255,255,0.4); color: white; padding: 0.5rem 0.75rem; border-radius: 6px; cursor: pointer; font-size: 1.1rem; outline: none; }
.icon-btn:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,0.3); }
.hidden-btn { display: none !important; }

.action-buttons { display: flex; gap: 1rem; width: 100%; }
@media (max-width: 768px) { .action-buttons { flex-direction: column; } }

.btn-outline-tmsofts { width: auto; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.5); color: white; padding: 0.4rem 0.8rem; font-size: 0.85rem; text-decoration: none; display: flex; align-items: center; gap: 0.4rem; border-radius: 6px; transition: background 0.3s, color 0.3s; }
.btn-outline-tmsofts:hover { background: white; color: var(--tmsofts-brand); }

/* TM Softs Network Link Cards */
.network-card { background: var(--bg-color); border: 1px solid var(--border-color); padding: 1rem; border-radius: 8px; text-decoration: none; color: var(--text-dark); display: flex; align-items: center; gap: 1rem; text-align: left; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; outline: none; }
.network-card:hover, .network-card:focus-visible { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.network-icon { background: var(--primary-light); color: white; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 1.3rem; flex-shrink: 0; transition: background 0.2s; }
.network-card:hover .network-icon, .network-card:focus-visible .network-icon { background: var(--accent); }
.network-info strong { display: block; font-size: 0.95rem; color: var(--primary); margin-bottom: 0.2rem; }
.network-info span { display: block; font-size: 0.8rem; color: var(--text-muted); line-height: 1.3; }

/* Ads Containers */
.ad-container { display: flex; align-items: center; justify-content: center; background: var(--ad-bg); border-radius: 6px; margin-bottom: 1.5rem; width: 100%; overflow: hidden; position: relative; }
.ad-container::before { content: 'Advertisement'; position: absolute; top: 2px; left: 6px; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); opacity: 0.6; pointer-events: none; }
.top-ad { min-height: 90px; margin-top: 1rem; }
.inline-ad { min-height: 250px; }
.sticky-bottom-ad { position: fixed; bottom: 0; left: 0; width: 100%; min-height: 60px; border-radius: 0; border-top: 1px solid var(--border-color); z-index: 1000; box-shadow: 0 -4px 10px rgba(0,0,0,0.1); margin-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0); }
.close-ad-btn { position: absolute; top: 0; right: 0; background: var(--danger); color: white; border: none; padding: 0.2rem 0.5rem; font-size: 0.8rem; cursor: pointer; border-bottom-left-radius: 4px; z-index: 1; }

/* Secondary/ghost button used for Copy + Share link */
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--border-color); }
.btn-ghost:hover { background: var(--bg-color); border-color: var(--accent); color: var(--accent); }

/* Toasts with Undo Support */
.toast { visibility: hidden; min-width: 280px; background-color: #1e293b; color: #fff; text-align: left; border-radius: 6px; padding: 12px 16px; position: fixed; z-index: 9999; left: 50%; bottom: 80px; transform: translateX(-50%); font-size: 0.9rem; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.toast.show { visibility: visible; animation: fadein 0.3s, fadeout 0.3s 3.7s; } /* Increased time slightly for Undo */
.btn-undo { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.4); color: white; padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.8rem; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.btn-undo:hover { background: rgba(255,255,255,0.3); }
@keyframes fadein { from { bottom: 0; opacity: 0; } to { bottom: 80px; opacity: 1; } }
@keyframes fadeout { from { bottom: 80px; opacity: 1; } to { bottom: 0; opacity: 0; } }

/* Utility Classes */
.mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 2rem; }
.text-muted { color: var(--text-muted); } .text-success { color: var(--success) !important; } .text-danger { color: var(--danger) !important; } .fw-bold { font-weight: 600; }
hr.divider { border: 0; border-top: 1px dashed var(--border-color); margin: 2rem 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
