/*
 * style.css
 * LSM Pay Customer Portal - Project-specific styles
 * app.css is the LSM standard boilerplate - do not modify
 */

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav-logo-mobile {
	height: 28px;
	vertical-align: middle;
}
.nav-portal-title-mobile {
	color: #fff;
	margin-left: 0.5rem;
}
.top-bar-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 1rem;
}
.top-bar-section {
	flex: 1;
}
.top-bar-section.center {
	text-align: center;
}
.top-bar-section.right {
	text-align: right;
}
.nav-brand-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}
.nav-logo {
	height: 50px;
}
.nav-brand-text {
	margin-left: 1rem;
	line-height: 1.2;
}
.nav-brand-title {
	color: #fff;
	font-size: 1.25rem;
	margin-left: 0;
}
.nav-brand-subtitle {
	color: rgba(255,255,255,0.8);
	font-size: 1.125rem;
	font-weight: 500;
}
.nav-menu-inline {
	display: inline-flex;
	justify-content: center;
}
.nav-menu-right {
	display: inline-flex;
	justify-content: flex-end;
}
.nav-link-white {
	color: #fff;
}

/* Nav item hover glow effect */
.top-bar .menu > li > a,
.nav-menu-inline .menu > li > a,
.nav-menu-right .menu > li > a {
	transition: all 0.2s ease;
	border-radius: 4px;
}
.top-bar .menu > li > a:hover,
.nav-menu-inline .menu > li > a:hover,
.nav-menu-right .menu > li > a:hover {
	background-color: rgba(255, 215, 0, 0.2);
	box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
	text-shadow: 0 0 4px rgba(255, 215, 0, 0.3);
}

/* Fix vertical centering for nav brand text */
.top-bar-left .site-title {
	margin: 0;
}

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */
.login-wrapper {
	min-height: 80vh;
	align-items: center;
}
.login-header {
	margin-top: 3rem;
	margin-bottom: 2rem;
}
.login-logo {
	max-width: 100px;
}
.login-title {
	margin-top: 1rem;
	margin-left: 0; /* override app.css boilerplate -36px */
}
.login-card {
	background-color: #f4f2ee;
	border: 1px solid #dcd1c4;
}
.login-options {
	margin-bottom: 1rem;
}

/* ==========================================================================
   DASHBOARD LAYOUT
   ========================================================================== */
.dashboard-container {
	display: flex;
	gap: 1.5rem;
	padding: 1.5rem;
	min-height: calc(100vh - 80px);
}
.left-panel {
	width: 20%;
	min-width: 220px;
}
.right-panel {
	width: 80%;
	flex: 1;
}
.panel {
	background-color: #f4f2ee;
	border: 1px solid #dcd1c4;
	border-radius: 4px;
	padding: 1.25rem;
	height: 100%;
}

/* Dashboard Left Panel */
.greeting {
	margin-bottom: 0.5rem;
}
.current-date {
	margin-bottom: 0.25rem;
	color: #666;
}
.current-time {
	font-size: 1.125rem;
	font-weight: 500;
	margin-bottom: 1rem;
}
.panel-divider {
	margin: 1rem 0;
	border-color: #dcd1c4;
}
.info-line {
	margin-bottom: 0.5rem;
}
.info-line:last-child {
	margin-bottom: 0;
}
.search-input-wrapper {
	position: relative;
	margin-bottom: 1rem;
}
.search-input-wrapper input[type="text"] {
	padding-right: 2rem;
	margin-bottom: 0;
}
.search-input-wrapper #clear-search-form {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
}
.search-clear-btn {
	background: transparent;
	border: none;
	color: #999;
	cursor: pointer;
	padding: 0;
	font-size: 1.25rem;
	line-height: 1;
	width: 1.5rem;
	height: 1.5rem;
	outline: none;
}
.search-clear-btn:hover,
.search-clear-btn:focus {
	color: #333;
	background: transparent;
	outline: none;
}

/* Pagination */
.pagination-controls {
	margin-top: 0.5rem;
}
.pagination-buttons {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.5rem;
}
.pagination-form {
	margin: 0;
}
.pagination-form .button {
	margin: 0;
	padding: 0.5rem 0.75rem;
}

/* Inline forms and link buttons */
.inline-form {
	display: inline;
	margin: 0;
}
.link-button {
	background: transparent;
	border: none;
	color: #785938;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	font-size: inherit;
	font-family: inherit;
	outline: none;
}
.link-button:hover,
.link-button:focus {
	color: #1c6017;
	background: transparent;
	outline: none;
}

/* Invoice view page - data rows with 30/70 split */
.data-row {
	display: flex;
	margin-bottom: 0.35rem;
}
.data-label {
	width: 30%;
	text-align: right;
	padding-right: 0.5rem;
	color: #666;
}
.data-value {
	width: 70%;
	text-align: left;
	font-weight: 600;
	line-height: 1.4;
}
.total-row {
	margin-top: 0.5rem;
}
.total-row .data-value {
	font-size: 1.125rem;
}

/* ==========================================================================
   MINI CALENDAR
   ========================================================================== */
.mini-calendar {
	margin-top: 1rem;
	font-size: 0.75rem;
}
.mini-calendar table {
	width: 100%;
	border-collapse: collapse;
	border: none;
}
.mini-calendar th {
	padding: 0.25rem;
	text-align: center;
	font-weight: 600;
	color: #785938;
	background: transparent;
}
.mini-calendar td {
	padding: 0.25rem;
	text-align: center;
	color: #666;
}
.mini-calendar .today {
	border: 2px solid #1c6017;
	border-radius: 4px;
	color: #1c6017;
	font-weight: bold;
}
.mini-calendar .other-month {
	color: #ccc;
}

/* ==========================================================================
   BALANCE DISPLAY
   ========================================================================== */
/* Override subsection-title margin for dashboard headings */
.panel .subsection-title {
	margin-bottom: 0.5rem;
}
.balance-display {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
	padding: 1rem;
	background-color: #fff;
	border: 1px solid #dcd1c4;
	border-radius: 4px;
}
.balance-display .button {
	margin: 0;
}
.balance-amount {
	font-size: 2rem;
	font-weight: 600;
	color: #1c6017;
}

/* ==========================================================================
   INVOICE TABLE
   ========================================================================== */
.invoice-table {
	width: 100%;
	font-size: 0.9375rem;
}
.invoice-table th {
	background-color: #dcd1c4;
	padding: 0.5rem 0.75rem;
}
.invoice-table td {
	padding: 0.5rem 0.75rem;
}
.invoice-table .amount {
	text-align: right;
}
.rollup-row {
	font-style: italic;
	background-color: #e8e4de;
}
.empty-message {
	text-align: center;
	color: #666;
}
.line-items-row {
	background-color: #f9f7f4;
}
.line-items-cell {
	font-size: 0.875rem;
	color: #666;
	font-style: italic;
	padding-left: 2rem !important;
	border-top: none !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media screen and (max-width: 39.9375em) {
	.dashboard-container {
		flex-direction: column;
	}
	.left-panel,
	.right-panel {
		width: 100%;
	}
	.mini-calendar {
		display: none;
	}
	.balance-display {
		flex-direction: column;
		text-align: center;
		gap: 1rem;
	}
	
	/* Mobile hamburger menu - 2 column grid */
	#main-nav {
		padding: 0.5rem !important;
	}
	.mobile-menu-container {
		width: 100%;
	}
	.mobile-menu {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 0.5rem;
		width: 100%;
		padding: 0.5rem;
	}
	.mobile-menu li {
		margin: 0;
		list-style: none;
	}
	.mobile-menu li a {
		display: block;
		padding: 0.75rem 0.5rem;
		background-color: rgba(255,255,255,0.1);
		border-radius: 4px;
		text-align: center;
		font-size: 0.9rem;
	}
	.mobile-menu li a:hover {
		background-color: rgba(255,255,255,0.2);
	}
}

/* ==========================================================================
   STATUS BADGES
   ========================================================================== */
.status-badge {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	border-radius: 3px;
	font-size: 0.8125rem;
	font-weight: 500;
}
.status-pending {
	background-color: #fff3cd;
	color: #856404;
}
.status-posted {
	background-color: #d4edda;
	color: #155724;
}
.status-overdue {
	background-color: #f8d7da;
	color: #721c24;
}
.status-unpaid {
	background-color: #e2e3e5;
	color: #383d41;
}
.status-paid {
	background-color: #d4edda;
	color: #155724;
}

/* ==========================================================================
   MY CARDS PAGE
   ========================================================================== */
/* Card list in left panel */
.card-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.card-list-form {
	margin: 0;
}
.card-list-item {
	width: 100%;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem;
	background: #fff;
	border: 2px solid #dcd1c4;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: left;
	font-family: inherit;
}
.card-list-item:hover {
	border-color: #785938;
	background: #fff;
}
.card-list-item.selected {
	border-color: #1c6017;
	background: #e8f5e9;
}

/* Mini card visual in list items - credit card aspect ratio ~1.586:1 */
.mini-card-visual {
	background: linear-gradient(135deg, #1c6017 0%, #2e8b28 100%);
	color: #fff;
	padding: 0.4rem 0.5rem;
	border-radius: 4px;
	width: 90px;
	height: 57px;
	flex-shrink: 0;
	font-size: 0.65rem;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
.mini-card-visual.expired {
	background: linear-gradient(135deg, #666 0%, #888 100%);
}
.mini-card-brand {
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 0.15rem;
}
.mini-card-number {
	font-family: monospace;
	font-size: 0.7rem;
	margin-bottom: 0.1rem;
}
.mini-card-exp {
	font-size: 0.6rem;
	opacity: 0.8;
}

.card-list-info {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.card-desc {
	font-weight: 600;
	color: #333;
	font-size: 0.9rem;
}
.card-mask {
	font-size: 0.875rem;
	color: #666;
	font-family: monospace;
}
.card-default-badge {
	font-size: 0.75rem;
	background: #1c6017;
	color: #fff;
	padding: 0.1rem 0.4rem;
	border-radius: 3px;
}

/* Default card label - small all caps text */
.card-default-label {
	font-size: 0.65rem;
	font-weight: 600;
	color: #1c6017;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Edit card dialog - description label row with checkbox */
label.description-label-row,
.description-label-row,
.description-label-row span {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-style: normal !important;
}

.make-default-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.85rem;
	font-style: normal;
}

.make-default-checkbox input[type="checkbox"] {
	margin: 0;
	width: 16px;
	height: 16px;
}

.make-default-text {
	color: #666;
	font-weight: normal;
}

.make-default-checkbox input[type="checkbox"]:checked + .make-default-text {
	color: #1c6017;
	font-weight: 500;
}

/* Card data rows - fixed width label */
.card-data-row {
	display: flex;
	margin-bottom: 0.35rem;
}
.card-data-row .data-label {
	width: 120px;
	flex-shrink: 0;
	text-align: right;
	padding-right: 0.75rem;
	color: #666;
}
.card-data-row .data-value {
	flex: 1;
	text-align: left;
	font-weight: 600;
	line-height: 1.4;
}

/* Card header row with action buttons */
.card-header-row {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	margin-bottom: 1rem;
}
.card-action-buttons {
	display: flex;
	gap: 0.5rem;
}
.card-action-buttons .button {
	margin: 0;
}

/* Card detail grid - single column */
.card-detail-grid {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}
.card-visual {
	grid-column: 1 / -1;
}

/* Credit card visual display */
.credit-card-display {
	background: linear-gradient(135deg, #1c6017 0%, #2e8b28 100%);
	color: #fff;
	padding: 1.5rem;
	border-radius: 12px;
	max-width: 400px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
	position: relative;
	overflow: hidden;
}
.credit-card-display::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
	pointer-events: none;
}
.credit-card-display .card-brand {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 1.5rem;
	text-transform: uppercase;
	letter-spacing: 1px;
}
.credit-card-display .card-number {
	font-size: 1.1rem;
	font-family: monospace;
	letter-spacing: 2px;
	margin-bottom: 1rem;
}
.credit-card-display .card-expiry {
	display: inline-block;
	margin-right: 2rem;
}
.credit-card-display .card-expiry .label {
	font-size: 0.7rem;
	text-transform: uppercase;
	opacity: 0.7;
	display: block;
}
.credit-card-display .card-holder {
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-top: 0.5rem;
}

/* Card info rows */
.info-row {
	display: flex;
	margin-bottom: 0.5rem;
}
.info-label {
	width: 40%;
	color: #666;
}
.info-value {
	width: 60%;
	font-weight: 500;
}

/* Default badge */
.badge-default {
	display: inline-block;
	background: #1c6017;
	color: #fff;
	padding: 0.2rem 0.5rem;
	border-radius: 3px;
	font-size: 0.8rem;
}

/* Billing address */
.billing-address p {
	margin: 0 0 0.25rem 0;
}

/* Edit description form */
.edit-description-form {
	margin: 0;
}
.edit-description-form .input-group {
	margin-bottom: 0;
}

/* Mobile toggle for card list */
.mobile-card-list-toggle {
	display: none;
	position: fixed;
	bottom: 1rem;
	left: 1rem;
	z-index: 100;
	background: #785938;
	color: #fff;
	border: none;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.3);
	cursor: pointer;
	font-size: 0.9rem;
}
.mobile-card-list-toggle:hover {
	background: #1c6017;
}

/* Custom modal width - between default (600px) and large (900px) */
.reveal.card-modal {
	max-width: 750px;
	width: 95%;
}

/* Mobile responsive */
@media screen and (max-width: 39.9375em) {
	.card-detail-grid {
		grid-template-columns: 1fr;
	}
	
	.mobile-card-list-toggle {
		display: block;
	}
	
	#card-list-panel {
		position: fixed;
		top: 0;
		left: -100%;
		width: 85%;
		max-width: 320px;
		height: 100vh;
		z-index: 200;
		transition: left 0.3s ease;
		background: #f4f2ee;
		box-shadow: 2px 0 12px rgba(0,0,0,0.3);
		overflow-y: auto;
	}
	#card-list-panel.mobile-open {
		left: 0;
	}
	#card-list-panel .panel {
		height: auto;
		min-height: 100vh;
	}
}

/* ==========================================================================
   MAKE PAYMENT PAGE
   ========================================================================== */
.payment-summary-left {
	margin: 1.5rem 0;
}

.summary-item {
	margin-bottom: 1rem;
}

.summary-item .summary-label {
	display: block;
	color: #666;
	font-size: 0.9rem;
	margin-bottom: 0.25rem;
}

.summary-item .summary-value {
	display: block;
	font-weight: 500;
	font-size: 1.1rem;
}

.pay-now-container {
	margin-top: 1.5rem;
}

.pay-now-container .help-text {
	text-align: center;
	color: #666;
	font-size: 0.85rem;
	margin-top: 0.5rem;
}

/* Apply Mode Buttons */
.apply-mode-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.apply-mode-btn {
	margin: 0;
}

.apply-mode-btn i {
	margin-right: 0.35rem;
}

/* Invoice Application Table */
.invoice-application-table-wrapper {
	margin-top: 1rem;
}

.application-table {
	font-size: 0.9rem;
}

.application-table th,
.application-table td {
	padding: 0.5rem;
}

.application-table .total-row td {
	border-top: 2px solid #1c6017;
	padding-top: 0.75rem;
}

.application-table .applied-amount.partial {
	color: #856404;
	font-style: italic;
}

.application-table .applied-amount.none {
	color: #999;
}

/* ==========================================================================
   PAYMENT MODALS
   ========================================================================== */
/* Common modal title icon */
.reveal h4 i {
	margin-right: 0.5rem;
}

/* Common centered modal buttons */
.amount-modal-buttons,
.invoices-modal-buttons {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

/* Partial Amount Modal */
.amount-input-container {
	margin: 1.5rem 0;
}

/* Invoice Selection Modal */
.invoice-selection-table-wrapper {
	margin-bottom: 1rem;
}

.invoice-selection-table .pay-amount-input {
	width: 100px;
	text-align: right;
	padding: 0.25rem 0.5rem;
	margin: 0;
}

.invoice-selection-table tbody tr.deselected {
	opacity: 0.5;
}

.invoice-selection-table tbody tr.deselected .pay-amount-input {
	background-color: #f0f0f0;
}

/* Aging Modal */
.aging-buckets-list {
	margin-bottom: 1rem;
}

.aging-table {
	width: 100%;
}

.aging-table .aging-amount-input {
	width: 120px;
	text-align: right;
	padding: 0.25rem 0.5rem;
	margin: 0;
}

.aging-table tbody tr.deselected {
	opacity: 0.5;
}

.aging-table tbody tr.deselected .aging-amount-input {
	background-color: #f0f0f0;
}

.aging-modal-buttons {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

/* Payment Method Dropdown */
.payment-method-select {
	width: 100%;
	font-size: 0.9rem;
	padding: 0.5rem;
	margin-top: 0.25rem;
	border: 1px solid #dcd1c4;
	border-radius: 4px;
	background-color: #fff;
	cursor: pointer;
	-webkit-appearance: menulist;
	-moz-appearance: menulist;
	appearance: menulist;
}

.payment-method-select:focus {
	border-color: #1c6017;
	outline: none;
	box-shadow: 0 0 3px rgba(28, 96, 23, 0.3);
}

/* ==========================================================================
   PAYMENT CONFIRMATION MODAL
   ========================================================================== */
.modal-step {
	min-height: 200px;
}

.confirm-details {
	background-color: #f8f8f8;
	padding: 1rem;
	border-radius: 4px;
	margin: 1rem 0;
}

.confirm-row {
	display: flex;
	justify-content: space-between;
	padding: 0.5rem 0;
	border-bottom: 1px solid #eee;
}

.confirm-row:last-child {
	border-bottom: none;
}

.confirm-label {
	color: #666;
}

.confirm-value {
	font-weight: 500;
}

.processing-container {
	text-align: center;
	padding: 2rem;
}

.spinner {
	margin-bottom: 1rem;
	color: #1c6017;
}

.result-icon {
	text-align: center;
	margin-bottom: 1rem;
}

.result-icon.success {
	color: #1c6017;
}

.result-icon.failure {
	color: #cc4b37;
}

.result-details {
	text-align: center;
	margin: 1rem 0;
}

.result-details p {
	margin-bottom: 0.5rem;
}

.error-message {
	color: #cc4b37;
	font-weight: 500;
}

.modal-actions {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
}
