/* Customer Vehicle & Document Portal — front-end styles */
.cvdp-portal { --cvdp-primary: #f59e0b; max-width: 1120px; margin: 0 auto; padding: 8px 0 40px; font-size: 16px; line-height: 1.6; }
.cvdp-title { margin: 0 0 6px; font-size: 1.7em; font-weight: 800; }
.cvdp-muted { color: #6b7280; margin: 0 0 8px; }
.cvdp-small { font-size: .85em; }

.cvdp-btn { display: inline-block; background: var(--cvdp-primary); color: #111 !important; font-weight: 700; padding: 10px 20px; border-radius: 10px; text-decoration: none !important; border: 0; cursor: pointer; transition: filter .15s; text-align: center; }
.cvdp-btn:hover { filter: brightness(1.08); }
.cvdp-btn-ghost { background: transparent; border: 1.5px solid #d1d5db; color: inherit !important; }
.cvdp-btn-block { display: block; margin-top: 12px; }

.cvdp-notice { border-radius: 12px; padding: 18px 22px; margin: 16px 0; border: 1px solid; }
.cvdp-notice-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.cvdp-notice-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Login */
.cvdp-login-wrap { display: flex; justify-content: center; padding: 40px 16px; }
.cvdp-login-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 32px; box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.cvdp-login-card input[type=text], .cvdp-login-card input[type=password] { width: 100%; padding: 11px 14px; border: 1.5px solid #d1d5db; border-radius: 10px; }
.cvdp-login-card input[type=text]:focus, .cvdp-login-card input[type=password]:focus { border-color: var(--cvdp-primary); outline: none; }
.cvdp-login-card .login-submit .button { width: 100%; background: var(--cvdp-primary); color: #111; font-weight: 700; padding: 12px; border: 0; border-radius: 10px; cursor: pointer; }

/* Dashboard header */
.cvdp-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.cvdp-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cvdp-search { display: flex; gap: 8px; }
.cvdp-search input { padding: 9px 14px; border: 1.5px solid #d1d5db; border-radius: 10px; min-width: 210px; }

/* Card grid */
.cvdp-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.cvdp-card { display: block; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; text-decoration: none !important; color: inherit !important; transition: transform .15s, box-shadow .15s; }
.cvdp-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.10); }
.cvdp-card-media { position: relative; aspect-ratio: 4/3; background: #f3f4f6; display: flex; align-items: center; justify-content: center; }
.cvdp-card-img { width: 100%; height: 100%; object-fit: cover; }
.cvdp-card-noimg { font-size: 48px; opacity: .4; }
.cvdp-card-media .cvdp-badge { position: absolute; top: 10px; left: 10px; }
.cvdp-card-body { padding: 18px; }
.cvdp-card-body h3 { margin: 0 0 4px; font-size: 1.1em; font-weight: 700; }
.cvdp-chassis { font-family: monospace; font-size: .85em; color: #6b7280; margin: 0 0 6px; }
.cvdp-price { font-size: 1.15em; font-weight: 800; color: #111827; margin: 0; }

.cvdp-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .75em; font-weight: 700; background: #f3f4f6; color: #374151; }
.cvdp-badge-preparing { background: #fef3c7; color: #92400e; }
.cvdp-badge-at_port  { background: #dbeafe; color: #1e40af; }
.cvdp-badge-shipped  { background: #e0e7ff; color: #3730a3; }
.cvdp-badge-arrived  { background: #d1fae5; color: #065f46; }
.cvdp-badge-delivered{ background: #bbf7d0; color: #14532d; }

/* Pagination */
.cvdp-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }
.cvdp-pagination a { display: inline-block; min-width: 40px; text-align: center; padding: 8px 0; border-radius: 10px; border: 1.5px solid #d1d5db; text-decoration: none !important; color: inherit !important; font-weight: 600; }
.cvdp-pagination a.is-current { background: var(--cvdp-primary); border-color: var(--cvdp-primary); color: #111 !important; }

/* ===================== Detail page — professional redesign ===================== */
.cvdp-detail { --cvdp-ink: #0f172a; --cvdp-line: #e5e7eb; }
.cvdp-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none !important; color: #374151 !important; padding: 6px 0; }
.cvdp-back:hover { color: var(--cvdp-primary) !important; }

/* Hero header band */
.cvdp-detail-head {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
	margin: 6px 0 22px; padding: 22px 26px; border-radius: 18px;
	background: linear-gradient(135deg, var(--cvdp-ink) 0%, #1e293b 100%);
	color: #fff; box-shadow: 0 12px 30px rgba(15,23,42,.18);
}
.cvdp-detail-head .cvdp-title { color: #fff; margin: 0; }
.cvdp-detail-head .cvdp-detail-sub { margin: 4px 0 0; color: #cbd5e1; font-size: .95em; }
.cvdp-detail-head .cvdp-badge { font-size: .8em; padding: 5px 14px; }

.cvdp-detail-cols { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .cvdp-detail-cols { grid-template-columns: 1fr; } }

/* Shared "card" surface for every block on the page */
.cvdp-panel {
	background: #fff; border: 1px solid var(--cvdp-line); border-radius: 16px;
	padding: 22px 24px; margin-bottom: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.cvdp-panel > h3 {
	margin: 0 0 16px; font-size: 1.05em; font-weight: 800; color: var(--cvdp-ink);
	display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--cvdp-line);
}

/* Gallery / carousel */
.cvdp-gallery-main { position: relative; border-radius: 14px; overflow: hidden; background: #f3f4f6; }
.cvdp-gallery-main img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 14px; cursor: zoom-in; display: block; transition: transform .3s; }
.cvdp-gallery-main:hover img { transform: scale(1.015); }
.cvdp-gallery-main::after {
	content: "🔍 Click to enlarge"; position: absolute; bottom: 12px; right: 14px;
	background: rgba(15,23,42,.72); color: #fff; font-size: .75em; font-weight: 600;
	padding: 5px 12px; border-radius: 999px; pointer-events: none;
}
.cvdp-gallery-nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(15,23,42,.55); color: #fff; font-size: 16px; display: flex;
	align-items: center; justify-content: center; transition: background .15s, transform .15s;
}
.cvdp-gallery-nav:hover { background: rgba(15,23,42,.85); transform: translateY(-50%) scale(1.08); }
.cvdp-gallery-prev { left: 14px; }
.cvdp-gallery-next { right: 14px; }
.cvdp-gallery-count {
	position: absolute; bottom: 12px; left: 14px; z-index: 2; background: rgba(15,23,42,.72);
	color: #fff; font-size: .75em; font-weight: 700; padding: 5px 12px; border-radius: 999px;
}
.cvdp-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.cvdp-thumb { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; line-height: 0; opacity: .75; transition: opacity .15s, border-color .15s, transform .15s; }
.cvdp-thumb img { width: 82px; height: 62px; object-fit: cover; display: block; }
.cvdp-thumb:hover { opacity: 1; transform: translateY(-2px); }
.cvdp-thumb.is-active { border-color: var(--cvdp-primary); opacity: 1; }

/* Specifications table — bold label column, normal-weight value column */
.cvdp-specs-table { width: 100%; border-collapse: collapse; }
.cvdp-specs-table tr { border-bottom: 1px solid var(--cvdp-line); }
.cvdp-specs-table tr:last-child { border-bottom: 0; }
.cvdp-specs-table tr:nth-child(odd) { background: #f9fafb; }
.cvdp-specs-table th,
.cvdp-specs-table td { text-align: left; padding: 12px 16px; vertical-align: top; }
.cvdp-specs-table th { width: 38%; font-weight: 700; color: var(--cvdp-ink); }
.cvdp-specs-table td { font-weight: 400; color: #374151; }

/* Price summary card (sidebar) */
.cvdp-price-card { background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; border-radius: 16px; padding: 20px 22px; margin-bottom: 22px; }
.cvdp-price-card h3 { margin: 0 0 14px; font-size: .95em; font-weight: 800; color: #92400e; text-transform: uppercase; letter-spacing: .04em; }
.cvdp-price-row { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #fcd34d; }
.cvdp-price-row:last-child { border-bottom: 0; }
.cvdp-price-row .cvdp-price-label { color: #92400e; font-weight: 600; font-size: .9em; }
.cvdp-price-row .cvdp-price-value { font-size: 1.3em; font-weight: 800; color: #78350f; }

/* Documents */
.cvdp-doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cvdp-doc-link {
	display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #f9fafb;
	border: 1.5px solid var(--cvdp-line); border-radius: 14px; text-decoration: none !important;
	color: inherit !important; font-weight: 700; transition: border-color .15s, background .15s, transform .15s;
}
.cvdp-doc-link:hover { border-color: var(--cvdp-primary); background: #fffbeb; transform: translateX(2px); }
.cvdp-doc-icon { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; font-size: 1.2em; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cvdp-doc-link.is-pending { opacity: .6; }
.cvdp-doc-link.is-pending:hover { transform: none; background: #f9fafb; border-color: var(--cvdp-line); }
.cvdp-doc-dl { margin-left: auto; font-size: .72em; font-weight: 800; color: var(--cvdp-primary); text-transform: uppercase; letter-spacing: .06em; background: #fff7ed; padding: 5px 10px; border-radius: 999px; }
.cvdp-doc-link.is-pending .cvdp-doc-dl { color: #9ca3af; background: #f3f4f6; }
.cvdp-security-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--cvdp-line); color: #6b7280 !important; }

/* Lightbox — forced display:none by default so it can never render "stuck open"
   even if a theme's CSS reset overrides the native [hidden] attribute. The
   JS also sets style.display directly (inline, highest specificity) as the
   primary safeguard; these rules are a secondary guarantee. Only the
   explicit .is-open class (toggled by JS) makes it visible. */
.cvdp-portal .cvdp-lightbox,
.cvdp-lightbox[hidden] { display: none !important; }
.cvdp-portal .cvdp-lightbox.is-open { display: flex !important; }
.cvdp-lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(10,10,12,.92); align-items: center; justify-content: center; padding: 4vw; }
.cvdp-lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.cvdp-lightbox-close { position: absolute; top: 18px; right: 24px; background: rgba(255,255,255,.1); border: 0; color: #fff; font-size: 30px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.cvdp-lightbox-close:hover { background: rgba(255,255,255,.22); }
.cvdp-lightbox-nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255,255,255,.1); color: #fff; font-size: 20px; display: flex;
	align-items: center; justify-content: center; transition: background .15s;
}
.cvdp-lightbox-nav:hover { background: rgba(255,255,255,.22); }
.cvdp-lightbox-prev { left: 18px; }
.cvdp-lightbox-next { right: 18px; }
@media (max-width: 600px) {
	.cvdp-lightbox-prev { left: 6px; }
	.cvdp-lightbox-next { right: 6px; }
	.cvdp-lightbox-nav { width: 40px; height: 40px; font-size: 16px; }
}
