/* User panel styling for new design */
.user_panel {
	background: rgba(256, 256, 256, 0.7);
	padding: 1em;
	margin: 2em 0;
}

.user_panel h3 {
	color: #5171aa;
	margin: 0 0 0.5em 0;
	padding-bottom: 0.5em;
	border-bottom: 2px solid #708cbd;
}

.user_panel p {
	margin: 0.5em 0;
}

.user_panel a.site {
	display: block;
	color: #000;
	border-bottom: 1px dotted #000;
	transition: all 0.2s;
}

.user_panel a.site:hover {
	border-bottom: none;
	background-color: #708cbd;
	color: white;
}

.user_panel a.search {
	display: block;
	padding: 0.8em;
	background: #708cbd;
	color: white;
	text-align: center;
	text-decoration: none;
	transition: all 0.2s;
	border-radius: 0;
}

.user_panel a.search:hover {
	background: #5171aa;
}

.user_actions {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid #708cbd;
}

/* Profile page card-based layout */
.profile_container {
	display: grid;
	grid-template-columns: 250px 1fr;
	grid-gap: 2em;
	margin: 2em 0;
}

.profile_sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.5em;
}

.profile_main {
	display: flex;
	flex-direction: column;
	gap: 1.5em;
}

.profile_card {
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid #ddd;
	padding: 1.5em;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile_card h2 {
	color: #5171aa;
	margin: 0 0 1em 0;
	padding-bottom: 0.5em;
	border-bottom: 2px solid #708cbd;
	font-size: 1.3em;
}

.profile_card h3 {
	color: #5171aa;
	margin: 1em 0 0.5em 0;
	font-size: 1.1em;
}

.profile_photo {
	text-align: center;
}

.profile_photo img {
	width: 120px;
	height: 180px;
	object-fit: cover;
	border: 1px solid #ddd;
	margin-bottom: 1em;
}

.profile_nav {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

.profile_nav a {
	display: block;
	padding: 0.6em 1em;
	background: #708cbd;
	color: white;
	text-decoration: none;
	transition: all 0.2s;
	text-align: center;
}

.profile_nav a:hover {
	background: #5171aa;
}

.profile_nav a.logout {
	background: #c05050;
}

.profile_nav a.logout:hover {
	background: #a03030;
}

.profile_form_row {
	margin: 0.8em 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.profile_form_row label {
	display: inline-block;
	width: 200px;
	font-weight: bold;
	color: #333;
}

.profile_form_row input[type="text"],
.profile_form_row input[type="password"],
.profile_form_row select {
	padding: 0.5em;
	border: 1px solid #ccc;
	width: 280px;
	font-family: inherit;
}

.profile_form_row input[type="text"]:focus,
.profile_form_row input[type="password"]:focus,
.profile_form_row select:focus {
	border-color: #5171aa;
	outline: none;
}

.profile_form_row input[type="radio"] {
	margin-right: 0.3em;
}

.profile_form_row .radio_label {
	font-weight: normal;
	margin-right: 1em;
}

.profile_fieldset {
	border: 1px solid #708cbd;
	padding: 1em;
	margin: 1em 0;
	background: rgba(112, 140, 189, 0.1);
}

.profile_fieldset legend {
	color: #5171aa;
	font-weight: bold;
	padding: 0 0.5em;
}

.profile_file_upload {
	border: 2px solid #708cbd;
	display: inline-block;
	padding: 0.5em 1em;
	cursor: pointer;
	background: #708cbd;
	color: white;
	transition: all 0.2s;
}

.profile_file_upload:hover {
	background: #5171aa;
}

.profile_file_upload input[type="file"] {
	display: none;
}

.profile_submit {
	background: #5171aa;
	color: white;
	border: none;
	padding: 0.6em 1.5em;
	cursor: pointer;
	font-size: 1em;
	transition: all 0.2s;
}

.profile_submit:hover {
	background: #3d5a8a;
}

.profile_lang_table {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
}

.profile_lang_table th,
.profile_lang_table td {
	padding: 0.6em;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

.profile_lang_table th {
	background: #f5f5f5;
	font-weight: bold;
	color: #5171aa;
}

.profile_lang_table tr:hover {
	background: rgba(81, 113, 170, 0.05);
}

.profile_error {
	color: #c00;
	background: #fee;
	padding: 0.5em;
	margin: 0.5em 0;
	border-left: 3px solid #c00;
}

.profile_warning {
	color: #c00;
	font-weight: bold;
	font-size: 1.1em;
}

.profile_lang_select {
	display: flex;
	gap: 1em;
	margin: 1em 0;
	flex-wrap: wrap;
}

.profile_lang_select select {
	min-width: 150px;
}

.profile_remove_section {
	background: rgba(255, 200, 200, 0.3);
	border: 1px solid #c05050;
}

.profile_remove_section h2 {
	border-bottom-color: #c05050;
	color: #a03030;
}

.profile_fullwidth {
	grid-column: 1 / -1;
}

/* Language buttons in profile */
.profile_lang_buttons {
	display: flex;
	gap: 0.5em;
	flex-wrap: wrap;
	margin-bottom: 1em;
}

.profile_lang_buttons form {
	margin: 0;
}

.profile_lang_buttons input[type="submit"] {
	background: #fff;
	color: #5171aa;
	border: 1px solid #5171aa;
	padding: 0.4em 0.8em;
	cursor: pointer;
	transition: all 0.2s;
}

.profile_lang_buttons input[type="submit"]:hover {
	background: #5171aa;
	color: white;
}

/* Responsive adjustments */
@media (max-width: 960px) {
	.profile_container {
		grid-template-columns: 1fr;
	}
	
	.profile_sidebar {
		order: 1;
	}
	
	.profile_main {
		order: 2;
	}
}

@media (max-width: 760px) {
	.profile_form_row label {
		width: 100%;
		margin-bottom: 0.3em;
	}
	
	.profile_form_row input[type="text"],
	.profile_form_row input[type="password"],
	.profile_form_row select {
		width: 100%;
	}
	
	.profile_nav {
		flex-direction: row;
		flex-wrap: wrap;
	}
	
	.profile_nav a {
		flex: 1;
		min-width: 120px;
	}
}

@media (max-width: 760px) {
	.user_panel {
		margin: 1em 0;
	}
}
