/* ========================================================
   3D Print Shop – Upload Form Frontend Styles
   ======================================================== */

.tdps-form-wrapper {
	max-width: 100%;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #2d2d2d;
}

/* --- Header --- */
.tdps-form-header {
	text-align: center;
	padding: 32px 24px 24px;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
	border-radius: 12px 12px 0 0;
	color: #fff;
	margin-bottom: 0;
}

.tdps-icon {
	font-size: 48px;
	margin-bottom: 12px;
	display: block;
	animation: tdps-spin 8s linear infinite;
}

@keyframes tdps-spin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

.tdps-form-header h2 {
	margin: 0 0 10px;
	font-size: 1.8em;
	font-weight: 700;
	color: #fff;
	border: none;
}

.tdps-form-header p {
	margin: 0;
	opacity: 0.85;
	font-size: 0.95em;
	line-height: 1.6;
}

/* --- Form Body --- */
#tdps-upload-form {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-top: none;
	border-radius: 0 0 12px 12px;
	padding: 32px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

/* --- Section Titles --- */
.tdps-section-title {
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #0f3460;
	border-bottom: 2px solid #e8f0fe;
	padding-bottom: 6px;
	margin: 28px 0 18px;
}

.tdps-section-title:first-of-type {
	margin-top: 0;
}

/* --- Field Rows --- */
/*.tdps-field-row {*/
/*	margin-bottom: 0;*/
/*}*/

.tdps-two-col {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 16px;
}

@media (max-width: 540px) {
	.tdps-two-col {
		grid-template-columns: 1fr;
	}
}

/* --- Individual Field --- */
.tdps-field {
	margin-bottom: 20px;
}

.tdps-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 0.9em;
	color: #333;
}

.tdps-required {
	color: #e53935;
	margin-left: 2px;
}

.tdps-field input[type="text"],
.tdps-field input[type="email"],
.tdps-field input[type="tel"],
.tdps-field input[type="number"],
.tdps-field textarea,
.tdps-field select {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid #d0d0d0;
	border-radius: 8px;
	font-size: 0.95em;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
	background: #fafafa;
	color: #2d2d2d;
}

.tdps-field input:focus,
.tdps-field textarea:focus,
.tdps-field select:focus {
	border-color: #0f3460;
	box-shadow: 0 0 0 3px rgba(15,52,96,0.12);
	outline: none;
	background: #fff;
}

.tdps-field textarea {
	resize: vertical;
	min-height: 80px;
}

.tdps-field-hint {
	display: block;
	font-size: 0.78em;
	color: #777;
	margin-top: 4px;
}

/* --- Upload Area --- */
.tdps-upload-area {
	position: relative;
	border: 2px dashed #b0bec5;
	border-radius: 10px;
	padding: 28px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
	background: #f8fafc;
	margin-bottom: 12px;
}

.tdps-upload-area:hover,
.tdps-upload-area.tdps-drag-over {
	border-color: #0f3460;
	background: #e8f0fe;
}

.tdps-upload-area input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.tdps-upload-icon {
	font-size: 2.5em;
	display: block;
	color: #0f3460;
	margin-bottom: 8px;
}

.tdps-upload-placeholder p {
	margin: 0 0 4px;
	font-weight: 500;
	color: #444;
}

.tdps-upload-formats {
	font-size: 0.78em;
	color: #888;
}

.tdps-upload-selected {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-weight: 500;
	color: #0f3460;
}

.tdps-file-icon {
	font-size: 1.4em;
}

.tdps-remove-file {
	background: none;
	border: none;
	font-size: 1.4em;
	cursor: pointer;
	color: #e53935;
	line-height: 1;
	padding: 0 4px;
}

/* --- Image Preview --- */
.tdps-image-preview-wrap {
	margin-top: 12px;
	text-align: center;
}

.tdps-preview-label {
	font-size: 0.85em;
	color: #555;
	margin-bottom: 8px;
	font-weight: 600;
}

#tdps-image-preview {
	max-width: 100%;
	max-height: 300px;
	border-radius: 8px;
	border: 1px solid #e0e0e0;
	box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* --- Size Fields --- */
.tdps-size-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-top: 10px;
}

@media (max-width: 480px) {
	.tdps-size-row {
		grid-template-columns: 1fr;
	}
}

.tdps-size-field label {
	font-size: 0.82em;
	color: #555;
	margin-bottom: 4px;
	font-weight: 600;
}

.tdps-input-unit {
	position: relative;
}

.tdps-input-unit input {
	padding-right: 38px !important;
}

.tdps-unit {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.8em;
	color: #888;
	pointer-events: none;
}

/* --- Submit Row --- */
.tdps-submit-row {
	margin-top: 28px;
	text-align: center;
}

.tdps-submit-btn {
	display: inline-block;
	padding: 14px 40px;
	background: linear-gradient(135deg, #0f3460, #16213e);
	color: #fff;
	border: none;
	border-radius: 50px;
	font-size: 1em;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s;
	box-shadow: 0 4px 15px rgba(15,52,96,0.35);
	letter-spacing: 0.03em;
}

.tdps-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(15,52,96,0.45);
}

.tdps-submit-btn:active {
	transform: translateY(0);
}

.tdps-submit-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

.tdps-btn-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: tdps-rotate 0.7s linear infinite;
	vertical-align: middle;
	margin-right: 6px;
}

@keyframes tdps-rotate {
	to { transform: rotate(360deg); }
}

.tdps-optional {
	font-size: 0.8em;
	font-weight: 400;
	color: #999;
	margin-left: 4px;
}

.tdps-submit-note {
	font-size: 0.75em;
	color: #999;
	margin-top: 12px;
	line-height: 1.5;
}

/* --- Notices --- */
.tdps-notice {
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 0.9em;
	line-height: 1.5;
}

.tdps-notice-success {
	background: #e8f5e9;
	border-left: 4px solid #43a047;
	color: #2e7d32;
}

.tdps-notice-error {
	background: #fce4ec;
	border-left: 4px solid #e53935;
	color: #b71c1c;
}

/* --- Thank You Screen --- */
.tdps-thank-you {
	text-align: center;
	padding: 60px 32px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.tdps-ty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	background: #43a047;
	color: #fff;
	border-radius: 50%;
	font-size: 2em;
	margin-bottom: 20px;
}

.tdps-thank-you h3 {
	font-size: 1.6em;
	color: #1a1a2e;
	margin: 0 0 12px;
}

.tdps-thank-you p {
	color: #555;
	font-size: 1em;
	line-height: 1.6;
}
