/**
 * VWT Artists Public Styles
 *
 * Mobile-first Design für das Künstler-Portal.
 * Nutzt CSS Custom Properties aus vwt-core.
 *
 * @package VWT_Artists
 */

/* === Portal Wrapper === */
.vwt-artist-portal {
	max-width: 700px;
	margin: 0 auto;
	padding: 0 16px 40px;
}

/* === Error Box === */
.vwt-artist-error-box {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-left: 4px solid #dc3545;
	border-radius: 8px;
	padding: 24px;
	margin: 40px auto;
	max-width: 500px;
	text-align: center;
}

.vwt-artist-error-box h2 {
	margin-top: 0;
	color: #dc3545;
}

/* === Header === */
.vwt-ap-header {
	text-align: center;
	padding: 24px 0 16px;
	border-bottom: 1px solid #e0e0e0;
	margin-bottom: 24px;
}

.vwt-ap-header h2 {
	margin: 0 0 8px;
	font-size: 24px;
	color: #1a2332;
}

.vwt-ap-event-info {
	color: #666;
	margin: 0 0 12px;
	font-size: 15px;
}

/* === Status Badge === */
.vwt-ap-status {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 16px;
	font-size: 13px;
	font-weight: 600;
}

.vwt-ap-status-data_requested {
	background: #fff3cd;
	color: #856404;
}

.vwt-ap-status-data_received {
	background: #d1ecf1;
	color: #0c5460;
}

.vwt-ap-status-preview_ready {
	background: #e2e3f1;
	color: #3c3fa0;
}

.vwt-ap-status-published {
	background: #d4edda;
	color: #155724;
}

.vwt-ap-status-completed {
	background: #e2e3e5;
	color: #383d41;
}

/* === Sections === */
.vwt-ap-section {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}

.vwt-ap-section h3 {
	margin: 0 0 16px;
	font-size: 18px;
	color: #1a2332;
	padding-bottom: 8px;
	border-bottom: 1px solid #f0f0f0;
}

/* === Hint Text === */
.vwt-ap-hint {
	color: #888;
	font-size: 13px;
}

/* === Cast Table === */
.vwt-ap-cast-table {
	width: 100%;
	border-collapse: collapse;
}

.vwt-ap-cast-table th,
.vwt-ap-cast-table td {
	padding: 8px 12px;
	border-bottom: 1px solid #f0f0f0;
	text-align: left;
	font-size: 14px;
}

.vwt-ap-cast-table th {
	font-weight: 600;
	color: #666;
	font-size: 12px;
	text-transform: uppercase;
}

.vwt-ap-leader-badge {
	display: inline-block;
	background: var(--vwt-accent, #e8a435);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 8px;
	text-transform: uppercase;
	margin-left: 4px;
}

/* === Image Gallery === */
.vwt-ap-image-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	margin-bottom: 12px;
}

.vwt-ap-image-item {
	position: relative;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
}

.vwt-ap-image-item img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
}

.vwt-ap-image-delete {
	position: absolute;
	top: 4px;
	right: 4px;
	background: rgba(0,0,0,0.6);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vwt-ap-image-delete:hover {
	background: #dc3545;
}

.vwt-ap-image-name {
	display: block;
	font-size: 11px;
	padding: 4px 6px;
	color: #666;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* === Progress Bar === */
.vwt-ap-progress {
	margin: 12px 0;
}

.vwt-ap-progress-bar {
	height: 16px;
	background: #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 6px;
}

.vwt-ap-progress-fill {
	height: 100%;
	background: var(--vwt-primary, #2c8c99);
	border-radius: 8px;
	transition: width 0.3s ease;
}

.vwt-ap-progress-text {
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

/* === Info Rows === */
.vwt-ap-info-row {
	margin-bottom: 12px;
}

.vwt-ap-info-row strong {
	display: inline-block;
	min-width: 100px;
	color: #333;
}

/* === Document List === */
.vwt-ap-docs-grid {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 8px;
}

.vwt-ap-doc-card {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 10px 14px;
}

.vwt-ap-doc-icon {
	font-size: 22px;
	flex-shrink: 0;
	width: 28px;
	text-align: center;
}

.vwt-ap-doc-info {
	flex: 1;
	min-width: 0;
}

.vwt-ap-doc-name {
	display: block;
	font-weight: 500;
	font-size: 14px;
	color: var(--vwt-primary, #2c8c99);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-decoration: none;
}

.vwt-ap-doc-name:hover {
	text-decoration: underline;
}

.vwt-ap-doc-meta {
	display: block;
	font-size: 12px;
	color: #888;
	margin-top: 1px;
}

.vwt-ap-doc-select {
	padding: 7px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
}

.vwt-ap-doc-upload {
	padding-top: 4px;
}

/* === Preview Box === */
.vwt-ap-preview-box {
	background: #f9f9f9;
	border: 1px dashed #ccc;
	border-radius: 6px;
	padding: 20px;
}

.vwt-ap-preview-box h4 {
	margin-top: 0;
}

/* === Thank You === */
.vwt-ap-thank-you {
	text-align: center;
	padding: 20px;
}

/* === Read-Only Text Block === */
.vwt-ap-readonly-text {
	background: #f9f9f9;
	padding: 10px 14px;
	border-radius: 4px;
	border-left: 3px solid var(--vwt-primary, #2c8c99);
	margin-top: 4px;
	font-size: 14px;
	color: #333;
}

/* === Collapsible Section === */
.vwt-ap-section-collapsible {
	padding: 0;
}

.vwt-ap-section-toggle {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 16px 20px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
}

.vwt-ap-section-toggle:hover {
	background: #f9f9f9;
}

.vwt-ap-section-toggle h3 {
	margin: 0;
	padding: 0;
	border: none;
	font-size: 18px;
}

.vwt-ap-section-toggle-icon {
	font-size: 14px;
	color: #999;
	transition: transform 0.2s;
}

.vwt-ap-section-collapsible.vwt-ap-section-open .vwt-ap-section-toggle-icon {
	transform: rotate(90deg);
}

.vwt-ap-section-body {
	padding: 0 20px 20px;
}

.vwt-ap-thank-you h3 {
	border: none;
}

/* === Member Cards (Persönliche Daten – Accordion) === */
.vwt-ap-member-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	margin-bottom: 8px;
	overflow: hidden;
}

.vwt-ap-member-toggle {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 12px 16px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-size: 15px;
	gap: 8px;
	transition: background 0.15s;
}

.vwt-ap-member-toggle:hover {
	background: #f5f5f5;
}

.vwt-ap-member-toggle-name {
	font-weight: 600;
	color: #1a2332;
	white-space: nowrap;
}

.vwt-ap-member-toggle-meta {
	flex: 1;
	font-size: 13px;
	color: #888;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vwt-ap-member-toggle-icon {
	font-size: 14px;
	color: #999;
	transition: transform 0.2s;
	flex-shrink: 0;
}

.vwt-ap-member-card.vwt-ap-member-open .vwt-ap-member-toggle-icon {
	transform: rotate(90deg);
}

/* Read-Only: statische Zeile ohne Klick */
.vwt-ap-member-static {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	gap: 8px;
}

.vwt-ap-member-body {
	padding: 0 16px 16px;
	border-top: 1px solid #f0f0f0;
}

.vwt-ap-member-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 16px;
	margin-top: 12px;
}

.vwt-ap-member-actions {
	margin-top: 10px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.vwt-btn-small {
	padding: 8px 16px;
	font-size: 13px;
}

.vwt-ap-member-card .vwt-field {
	margin-bottom: 0;
}

.vwt-ap-member-card .vwt-field label {
	font-size: 12px;
	color: #666;
}

.vwt-ap-member-card .vwt-field input,
.vwt-ap-member-card .vwt-field textarea {
	font-size: 14px;
	padding: 7px 10px;
}

@media (max-width: 600px) {
	.vwt-ap-member-fields {
		grid-template-columns: 1fr;
	}

	.vwt-ap-member-toggle-meta {
		display: none;
	}

	.vwt-artist-portal {
		padding: 0 0 30px;
		margin-left: -12px;
		margin-right: -12px;
	}

	.vwt-ap-section {
		padding: 12px 10px;
		margin-bottom: 10px;
		border-radius: 4px;
		border-left: none;
		border-right: none;
	}

	.vwt-ap-header {
		padding: 0 10px;
	}

	.vwt-ap-header h2 {
		font-size: 18px;
	}

	.vwt-ap-section h3 {
		font-size: 15px;
	}

	.vwt-ap-section-toggle {
		padding: 10px;
	}

	.vwt-ap-section-body {
		padding: 0 10px 12px;
	}

	.vwt-ap-member-card {
		margin-bottom: 6px;
	}

	.vwt-ap-member-toggle {
		padding: 10px 8px;
	}

	.vwt-ap-member-body {
		padding: 0 8px 10px;
	}

	.vwt-ap-member-static {
		padding: 10px 8px;
	}

	.vwt-ap-image-gallery {
		gap: 8px;
	}

	.vwt-ap-image-item {
		width: calc(50% - 4px);
	}
}

/* === Artists List (Shortcode [vwt_artists_list]) === */
.vwt-artists-list-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}

.vwt-artists-list-item:last-child {
	border-bottom: none;
}

.vwt-artists-list-photo {
	flex-shrink: 0;
}

.vwt-artists-list-photo img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 6px;
}

.vwt-artists-list-photo-placeholder {
	width: 60px;
	height: 60px;
	border-radius: 6px;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	color: #ccc;
}

.vwt-artists-list-info {
	flex: 1;
	min-width: 0;
}

.vwt-artists-list-name {
	display: block;
	font-weight: 600;
	font-size: 15px;
	color: var(--vwt-primary, #2c8c99);
	text-decoration: none;
}

a.vwt-artists-list-name:hover {
	text-decoration: underline;
}

.vwt-artists-list-stage {
	display: inline;
	font-size: 13px;
	color: #888;
	font-style: italic;
	margin-left: 4px;
}

.vwt-artists-list-stage::before {
	content: '(';
}

.vwt-artists-list-stage::after {
	content: ')';
}

.vwt-artists-list-instrument {
	display: block;
	font-size: 13px;
	color: #666;
	margin-top: 1px;
}

/* === Actions === */
.vwt-ap-actions {
	padding: 20px 0;
	display: flex;
	align-items: center;
	gap: 12px;
}

/* === Buttons === */
.vwt-btn-primary {
	background: var(--vwt-primary, #2c8c99);
	color: #fff;
}

.vwt-btn-primary:hover {
	background: #247a86;
	color: #fff;
}

.vwt-btn-secondary {
	background: #f0f0f1;
	color: #333;
	border: 1px solid #ccc;
}

.vwt-btn-secondary:hover {
	background: #e0e0e1;
}

/* === Character Counter === */
.vwt-char-counter::after {
	content: attr(data-count);
}

/* === Responsive === */
@media (max-width: 600px) {
	.vwt-ap-image-gallery {
		grid-template-columns: repeat(2, 1fr);
	}

	.vwt-ap-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.vwt-ap-info-row strong {
		display: block;
		margin-bottom: 2px;
	}
}
