/* ===================================================================
   Charity Asset Donation – Frontend Styles
   =================================================================== */

/* Trigger link */
.cad-trigger-link {
	display: inline-block;
	cursor: pointer;
	color: #1a4d8c;
	text-decoration: underline;
	font-weight: 600;
}
.cad-trigger-link:hover { color: #0d3163; }

/* Overlay */
.cad-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.6);
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 30px 15px;
	overflow-y: auto;
	animation: cadFadeIn 0.2s ease;
}
@keyframes cadFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Modal box */
.cad-modal {
	position: relative;
	background: #fff;
	border-radius: 10px;
	width: 100%;
	max-width: 760px;
	box-shadow: 0 20px 50px rgba(0,0,0,0.3);
	animation: cadSlideUp 0.3s ease;
}
@keyframes cadSlideUp { from { transform: translateY(30px); opacity:0;} to { transform: translateY(0); opacity:1; } }

/* Close button */
.cad-modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: transparent;
	border: 0;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: #999;
	padding: 0;
	width: 36px;
	height: 36px;
}
.cad-modal-close:hover { color: #000; }

/* Header */
.cad-modal-header {
	padding: 25px 30px 15px;
	border-bottom: 1px solid #eee;
	background: linear-gradient(135deg, #1a4d8c 0%, #2c6cb0 100%);
	color: #fff;
	border-radius: 10px 10px 0 0;
}
.cad-modal-header h2 {
	margin: 0 0 5px;
	color: #fff;
	font-size: 22px;
}
.cad-subtitle {
	margin: 0;
	font-size: 14px;
	opacity: 0.9;
	color: #fff;
}

/* Body */
.cad-modal-body { padding: 20px 30px 30px; }

/* Message banner */
.cad-message {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 14px;
}
.cad-message.cad-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.cad-message.cad-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Fieldsets */
.cad-fieldset {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 18px 20px 8px;
	margin: 0 0 20px;
}
.cad-fieldset legend {
	font-weight: 700;
	font-size: 15px;
	color: #1a4d8c;
	padding: 0 8px;
}

/* Layout rows / cols */
.cad-row {
	display: flex;
	gap: 15px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}
.cad-col { flex: 1; min-width: 220px; }
.cad-col-full { flex: 1 1 100%; min-width: 100%; }

/* Labels & inputs */
.cad-modal label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 5px;
	color: #333;
}
.cad-req { color: #c00; }
.cad-note { font-weight: 400; color: #777; font-size: 12px; }

.cad-modal input[type="text"],
.cad-modal input[type="email"],
.cad-modal input[type="tel"],
.cad-modal input[type="number"],
.cad-modal input[type="date"],
.cad-modal input[type="file"],
.cad-modal select,
.cad-modal textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
	background: #fff;
	font-family: inherit;
}
.cad-modal input:focus,
.cad-modal select:focus,
.cad-modal textarea:focus {
	border-color: #1a4d8c;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(26,77,140,0.15);
}
.cad-modal textarea { resize: vertical; }

/* Checkbox / Radio */
.cad-checkbox,
.cad-radio {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	margin: 6px 0;
	cursor: pointer;
}
.cad-checkbox input,
.cad-radio input {
	margin: 0;
	width: auto;
}
.cad-radio-group {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

/* Footer */
.cad-form-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding-top: 10px;
	border-top: 1px solid #eee;
	margin-top: 15px;
}

/* Buttons */
.cad-btn {
	padding: 11px 22px;
	border-radius: 6px;
	border: 0;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}
.cad-btn-primary {
	background: #1a4d8c;
	color: #fff;
}
.cad-btn-primary:hover  { background: #0d3163; }
.cad-btn-primary:disabled { background: #88a; cursor: not-allowed; }
.cad-btn-secondary {
	background: #e2e2e2;
	color: #333;
}
.cad-btn-secondary:hover { background: #ccc; }

/* Responsive */
@media (max-width: 600px) {
	.cad-modal-body { padding: 15px 18px 20px; }
	.cad-modal-header { padding: 20px; }
	.cad-row { gap: 10px; }
	.cad-col { min-width: 100%; }
}
