/* TUM Catalog Submission Form Styles */
.tum-catalog-submission-form {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px 0;
}

.tum-form-title {
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: 600;
	color: #1a1a1a;
}

.tum-form-description {
	margin: 0 0 24px;
	color: #666;
	line-height: 1.6;
}

.tum-catalog-form {
	border: 1px solid #e0e0e0;
	padding: 32px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tum-form-section {
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e0e0e0;
}

.tum-form-section:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.tum-form-section h4 {
    margin: 0 0 25px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    border-left: 3px solid #0073aa;
    line-height: 1.7;
    background: #f8f9fa;
    padding: 10px 30px;
}

.tum-form-row {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

.tum-form-row-half .tum-form-field {
	flex: 1;
}

.tum-form-row-quarter .tum-form-field {
	flex: 1;
}

.tum-form-field {
	display: flex;
	flex-direction: column;
    width: 100%;
}

.tum-form-field label {
	font-weight: 500;
	margin-bottom: 6px;
	color: #1a1a1a;
	font-size: 14px;
}

.tum-form-field input,
.tum-form-field select,
.tum-form-field textarea {
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.3s ease;
}

.tum-form-field input:focus,
.tum-form-field select:focus,
.tum-form-field textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.tum-form-field input[required],
.tum-form-field select[required],
.tum-form-field textarea[required] {
	border-left: 3px solid #d63384;
}

.tum-form-field input[required]:valid,
.tum-form-field select[required]:valid,
.tum-form-field textarea[required]:valid {
	border-left: 3px solid #00a32a;
}

/* Error State for Invalid Fields */
.tum-field-error {
	border: 2px solid #d63384 !important;
	border-left: 4px solid #d63384 !important;
	background-color: #fff5f8 !important;
	animation: shake 0.5s;
}

.tum-field-error:focus {
	border-color: #d63384 !important;
	box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.2) !important;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
	20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Checkbox Grid */
.tum-checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}

.tum-checkbox-item {
	display: flex;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 14px;
}

.tum-checkbox-item:hover {
	background-color: #f8f9fa;
	border-color: #0073aa;
}

.tum-checkbox-item input[type="checkbox"] {
	margin-right: 8px;
	transform: scale(1.1);
    margin-top: 0;
}

.tum-checkbox-item input[type="checkbox"]:checked + span {
	font-weight: 500;
	color: #0073aa;
}

/* Image Upload */
.tum-form-field input[type="file"] {
	padding: 12px;
	border: 2px dashed #ddd;
	border-radius: 6px;
	background: #f8f9fa;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.3s ease;
}

.tum-form-field input[type="file"]:hover {
	border-color: #0073aa;
	background: #f0f8ff;
}

/* Image Preview */
.tum-image-preview,
.tum-gallery-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
}

.tum-image-container {
	position: relative;
	width: 120px;
	height: 120px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	background: #f8f9fa;
}

.tum-image-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tum-remove-image {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 20px;
	height: 20px;
	background: rgba(220,53,69,0.9);
	color: white;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease;
}

.tum-remove-image:hover {
	background: #dc3545;
}

/* Submit Button */
.tum-submit-btn {
	width: 100%;
	padding: 14px 24px;
	background: #00a32a;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s ease;
}

.tum-submit-btn:hover:not(:disabled) {
	background: #008a20;
}

.tum-submit-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

/* Messages */
.tum-form-message {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	min-height: auto;
	display: none;
    margin-bottom: 16px;
}

/* Verification Required Message */
.tum-verification-required {
	background: #fff3cd;
	border: 1px solid #ffeaa7;
	border-radius: 6px;
	padding: 16px;
	margin-bottom: 20px;
}

.tum-verification-required p {
	margin: 0;
	color: #856404;
	font-size: 14px;
	line-height: 1.5;
}

.tum-message-success {
	display: block;
	background: #e6f4ea;
	color: #1e8e3e;
	border: 1px solid #a8dab5;
}

.tum-message-error {
	display: block;
	background: #fce8e6;
	color: #c5221f;
	border-left: 4px solid #dc3545;
	white-space: pre-line;
	line-height: 1.6;
	position: relative;
	padding-left: 45px;
	font-weight: 500;
	box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.tum-message-error::before {
	content: "⚠";
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 24px;
	color: #dc3545;
	font-weight: bold;
}

.tum-message-info {
	display: block;
	background: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
	.tum-catalog-submission-form {
		padding: 15px;
	}
	
	.tum-catalog-form {
		padding: 24px 16px;
	}
	
	.tum-form-row {
		flex-direction: column;
		gap: 12px;
	}
	
	.tum-checkbox-grid {
		grid-template-columns: 1fr;
	}
	
	.tum-image-container {
		width: 100px;
		height: 100px;
	}
	
	.tum-form-title {
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.tum-form-section h4 {
		font-size: 16px;
	}
	
	.tum-catalog-form {
		padding: 16px;
	}
}

.tum-limit-reached h3 {
    margin: 0;
    font-size: 26px;
}

.tum-limit-reached .button{
    padding: 12px 23px;
    border-radius: 100px;
    margin-top: 0;
    display: inline-block;
}

/* Character Counter */
.tum-char-counter {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    text-align: right;
    transition: color 0.3s ease;
}

.tum-char-counter-warning {
    color: #d63384;
}

.tum-char-counter-warning .tum-char-count {
    font-weight: 600;
    color: #d63384;
}

.tum-char-counter-success {
    color: #00a32a;
}

.tum-char-counter-success .tum-char-count {
    font-weight: 600;
    color: #00a32a;
}

/* Field Hint */
.tum-field-hint {
    font-size: 12px;
    font-weight: 400;
    color: #666;
    margin-left: 4px;
}


.tum-submit-btn {
    border-radius: 100px;
}

/* House Plan Section */
.tum-house-plan-section .tum-field-description {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.tum-house-plans-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.tum-house-plan-item {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
}

.tum-house-plan-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

.tum-house-plan-item .tum-form-field label {
    font-weight: 600;
    font-size: 13px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tum-house-plan-preview {
    margin-top: 10px;
}

.tum-house-plan-preview img {
    display: block;
    max-width: 200px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
}

.tum-remove-plan-btn {
    padding: 8px 16px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.tum-remove-plan-btn:hover {
    background: #c82333;
}

#tum-add-plan-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

#tum-add-plan-btn:hover {
    background: #005a87;
}

/* Responsive for House Plans */
@media (max-width: 768px) {
    .tum-house-plan-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .tum-house-plan-item {
        padding: 16px;
    }
}

/* Google Map Section */
.tum-google-map-field {
    width: 100%;
}

.tum-map-controls {
    position: relative;
    margin-bottom: 10px;
}

.tum-map-actions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.tum-map-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.tum-map-btn:hover {
    background: #f8f9fa;
    border-color: #0073aa;
}

.tum-map-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #666;
}

.tum-map-btn:hover .dashicons {
    color: #0073aa;
}

.tum-map-search-input {
    width: 100%;
    padding: 12px 120px 12px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.tum-map-search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.tum-map-loading {
    position: absolute;
    right: 120px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.tum-map-loading.active {
    display: block;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.tum-map-canvas {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
    position: relative;
}

/* Remove autocomplete dropdown styles that may conflict */
.pac-container {
    z-index: 10000 !important;
    font-family: inherit;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pac-item {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    border-top: 1px solid #e0e0e0;
}

.pac-item:first-child {
    border-top: none;
}

.pac-item:hover {
    background: #f8f9fa;
}

.pac-icon {
    margin-right: 10px;
}

/* Responsive for Google Map */
@media (max-width: 768px) {
    .tum-map-canvas {
        height: 300px;
    }
    
    .tum-map-search-input {
        padding-right: 100px;
    }
    
    .tum-map-btn {
        width: 28px;
        height: 28px;
    }
    
    .tum-map-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .tum-map-canvas {
        height: 250px;
    }
}