﻿/* ============================================================
   Profile pages (Views/Profile: Index, Edit, PreviousProject)
   The project pages load this file too, for the cards, lists, tags and form pieces.
   Loaded after home.css, which holds the shared pieces: the colours (--rq-...),
   .rq-container, .rq-btn, .rq-hero and .rq-section.
   Sides are written as start / end, so the same rules work in Arabic.
   ============================================================ */

/* ---------- A shorter top part than the home page ---------- */
.rq-hero.rq-hero-slim { padding: 124px 0 44px; }

.rq-profile-head,
.rq-page-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.rq-page-head { justify-content: space-between; }

.rq-profile-who { flex: 1; min-width: 240px; }

.rq-hero-slim h1 {
	margin: 0 0 4px;
	font-size: clamp(26px, 3.2vw, 36px);
	line-height: 1.3;
	letter-spacing: 0;
}

.rq-page-head p,
.rq-profile-title {
	margin: 0;
	font-size: 17px;
	color: rgba(255, 255, 255, 0.86);
}

/* Photo */
.rq-avatar {
	width: 112px;
	height: 112px;
	flex: none;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
	border: 4px solid rgba(255, 255, 255, 0.9);
	box-shadow: 0 14px 30px rgba(6, 52, 63, 0.3);
}

.rq-avatar-edit {
	width: 88px;
	height: 88px;
	border-color: #fff;
	box-shadow: 0 6px 18px rgba(6, 52, 63, 0.18);
}

/* The small facts under the name */
.rq-chips {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
}

.rq-chips li {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 13px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}

.rq-chips .rq-chip-free { background: rgba(124, 240, 192, 0.2); border-color: rgba(124, 240, 192, 0.5); }
.rq-chips .rq-chip-busy { background: rgba(255, 215, 106, 0.2); border-color: rgba(255, 215, 106, 0.5); }

.rq-flag {
	width: 20px;
	height: 14px;
	object-fit: cover;
	border-radius: 2px;
}

/* ---------- Body ---------- */
.rq-section.rq-profile-body { padding: 36px 0 72px; }

.rq-profile-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 24px;
	align-items: start;
}

.rq-profile-main,
.rq-profile-side,
.rq-edit {
	display: grid;
	gap: 24px;
	min-width: 0;
}

.rq-edit { max-width: 860px; }

.rq-card {
	padding: 28px;
	border-radius: var(--rq-radius);
	background: #fff;
	box-shadow: 0 10px 30px rgba(6, 52, 63, 0.07);
	text-align: start;
	min-width: 0;
}

.rq-card h2 {
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 800;
	color: var(--rq-ink);
}

.rq-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 6px;
}

.rq-card-head h2 { margin: 0; }
.rq-card-head .rq-btn { padding: 9px 16px; font-size: 15px; }

/* Text typed by a user: keep the line breaks they typed, and never let a long word push the page wider */
.rq-text {
	margin: 0;
	font-size: 16px;
	line-height: 1.8;
	color: var(--rq-text);
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.rq-empty { margin: 0; font-size: 15.5px; color: #8ea5a8; }

.rq-hint {
	display: block;
	margin: 0 0 16px;
	font-size: 14.5px;
	line-height: 1.6;
	color: #7d9497;
}

/* Contact list */
.rq-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rq-contact li { display: flex; align-items: center; gap: 12px; font-size: 16px; min-width: 0; }
.rq-contact a, .rq-contact span { color: var(--rq-ink); overflow-wrap: anywhere; min-width: 0; }
.rq-contact a:hover { color: var(--rq-brand); }

.rq-contact i {
	width: 38px; height: 38px; flex: none;
	display: grid; place-items: center;
	border-radius: 11px;
	background: var(--rq-brand-soft);
	color: var(--rq-brand);
	font-size: 17px;
}

/* A list of "name ..... years" rows */
.rq-rows { list-style: none; margin: 0; padding: 0; }

.rq-rows li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--rq-line);
	font-size: 16px;
	color: var(--rq-ink);
}

.rq-rows li:last-child { border-bottom: none; padding-bottom: 0; }
.rq-rows li:first-child { padding-top: 0; }
.rq-rows li > span:first-of-type { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rq-rows small { font-size: 14px; color: #7d9497; white-space: nowrap; }

.rq-rows-edit { margin-bottom: 18px; }
.rq-rows-edit li, .rq-rows-edit li:first-child, .rq-rows-edit li:last-child { padding: 10px 0; }

/* Skills */
.rq-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.rq-tags li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 13px;
	border-radius: 999px;
	background: var(--rq-brand-soft);
	color: var(--rq-brand-dark);
	font-size: 15px;
	font-weight: 600;
}

.rq-tags small { font-size: 13px; font-weight: 500; color: #7c7fa6; }
.rq-tags-edit { margin-bottom: 18px; }
.rq-tags-edit li { padding-inline-end: 6px; }

/* ---------- Previous work cards ---------- */
.rq-works { display: grid; gap: 20px; }

.rq-work {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--rq-line);
}

.rq-work:last-child { border-bottom: none; padding-bottom: 0; }

.rq-work-cover {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 14px;
	overflow: hidden;
	background: #eaf3f4;
}

.rq-work-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rq-work-count {
	position: absolute;
	bottom: 8px;
	inset-inline-end: 8px;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(6, 52, 63, 0.7);
	color: #fff;
	font-size: 13px;
}

/* A work with no picture uses the whole width */
.rq-work-body:first-child { grid-column: 1 / -1; }

.rq-work h3 { margin: 0 0 2px; font-size: 18px; font-weight: 700; color: var(--rq-ink); }
.rq-work-date { display: block; margin-bottom: 8px; font-size: 14px; color: #7d9497; }

.rq-work-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rq-work-thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }

.rq-work-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	font-weight: 700;
	color: var(--rq-brand);
}

.rq-work-link:hover { color: var(--rq-brand-dark); }

/* ---------- Forms ---------- */
.rq-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 20px;
	margin-bottom: 8px;
}

.rq-field { min-width: 0; }
.rq-field-wide { grid-column: 1 / -1; }

.rq-label {
	display: block;
	margin: 0 0 7px;
	font-size: 15px;
	font-weight: 700;
	color: var(--rq-ink);
}

.rq-card textarea.with-border {
	height: auto;
	min-height: 150px;
	padding: 14px 20px;
	line-height: 1.7;
}

/* A plain select box (the template's fancy one is not used here, so it works the same in Arabic) */
.rq-card select.rq-select {
	height: 48px;
	padding: 0 16px;
	line-height: normal;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.05);
	color: #808080;
	font-weight: 500;
}

/* The template gives every input a height and a shadow; a file box and a tick box must not have them */
.rq-card input[type="file"].rq-file {
	height: auto;
	line-height: 1.5;
	padding: 0;
	margin: 0 0 6px;
	box-shadow: none;
	border-radius: 0;
	background: none;
	font-size: 15px;
}

.rq-check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	font-size: 16px;
	color: var(--rq-ink);
	cursor: pointer;
}

.rq-card .rq-check input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	box-shadow: none;
	flex: none;
	accent-color: var(--rq-brand);
}

.rq-photo-row {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 22px;
}

.rq-photo-row .rq-hint { margin: 0; }

/* A button that looks like a link (Remove photo, Edit) */
.rq-link-button {
	padding: 0;
	margin-top: 6px;
	background: none;
	border: none;
	font-size: 15px;
	font-weight: 700;
	color: var(--rq-brand);
	cursor: pointer;
}

.rq-link-button:hover { color: var(--rq-brand-dark); text-decoration: underline; }
.rq-rows .rq-link-button { margin-top: 0; }

/* The small round remove button */
.rq-x {
	width: 30px; height: 30px; flex: none;
	display: grid; place-items: center;
	border-radius: 50%;
	background: #fff;
	color: #c45b6a;
	font-size: 15px;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.rq-rows .rq-x { background: #f3f8f9; }
.rq-x:hover { background: #e0465a; color: #fff; }
.rq-rows form, .rq-tags form { margin: 0; display: flex; }

/* "choose + years + Add" in one line */
.rq-add {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.rq-add > select, .rq-add > input[type="text"] { flex: 1 1 220px; width: auto; margin: 0; }
.rq-add > .rq-years { flex: 0 0 110px; width: 110px; margin: 0; }
.rq-add > .rq-btn { height: 48px; padding: 0 22px; }

/* Previous work rows on the edit page */
.rq-rows-work img, .rq-no-picture {
	width: 64px; height: 48px; flex: none;
	border-radius: 8px;
	object-fit: cover;
}

.rq-no-picture { display: grid; place-items: center; background: #eaf3f4; color: #b3b6cc; font-size: 20px; }

/* Pictures of one previous project */
.rq-pictures { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.rq-picture { position: relative; }
.rq-picture img { width: 132px; height: 99px; object-fit: cover; border-radius: 12px; display: block; }

.rq-picture .rq-x {
	position: absolute;
	top: 6px;
	inset-inline-end: 6px;
	box-shadow: 0 4px 10px rgba(6, 52, 63, 0.25);
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1099px) {
	.rq-hero.rq-hero-slim { padding-top: 108px; }
	.rq-profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	.rq-card { padding: 22px 18px; }
	.rq-fields { grid-template-columns: 1fr; }
	.rq-work { grid-template-columns: 1fr; }
	.rq-avatar { width: 88px; height: 88px; }
	.rq-add > .rq-years { flex: 1 1 90px; }
}

/* Text with dir="auto" picks its own direction; in a card it should still start on the page's start side */
.rq-card [dir="auto"] { text-align: start; }

/* ============================================================
   Stars and reviews (Views/Shared/_Stars.cshtml, the Reviews card, the review form)
   ============================================================ */
.rq-stars { display: inline-flex; align-items: center; gap: 1px; font-size: 14px; color: #bcd3d5; white-space: nowrap; }
.rq-stars i { font-size: 17px; }
.rq-stars .rq-star-on { color: #f5a623; }
.rq-stars b { margin-inline-start: 6px; font-size: 14.5px; color: var(--rq-ink); }
.rq-stars small { margin-inline-start: 3px; font-size: 13.5px; color: #7d9497; }
.rq-stars.rq-stars-none { font-size: 13.5px; color: #8ea5a8; }

/* In a review's own row there is one review, so its count "(1)" says nothing */
.rq-review .rq-stars small { display: none; }

/* On the coloured top part of a profile */
.rq-chips .rq-chip-stars .rq-stars, .rq-chips .rq-chip-stars .rq-stars b { color: #fff; }
.rq-chips .rq-chip-stars .rq-stars i { color: rgba(255, 255, 255, 0.45); }
.rq-chips .rq-chip-stars .rq-stars .rq-star-on { color: #ffd76a; }
.rq-chips .rq-chip-stars .rq-stars small { color: rgba(255, 255, 255, 0.8); }

.rq-reviews { display: grid; gap: 16px; }
.rq-review { padding-bottom: 16px; border-bottom: 1px solid var(--rq-line); }
.rq-review:last-child { padding-bottom: 0; border-bottom: none; }

.rq-review-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.rq-review-top time { font-size: 13.5px; color: #7d9497; }
.rq-review-from { margin: 8px 0 0; font-size: 14.5px; color: #7d9497; overflow-wrap: anywhere; }
.rq-review-from a { font-weight: 700; color: var(--rq-ink); }
.rq-review-from a:hover { color: var(--rq-brand); }

/* ---------- Choosing stars ---------- */
.rq-star-pick {
	display: inline-flex;
	flex-direction: row-reverse; /* written 5..1, shown 1..5 */
	gap: 4px;
	margin-bottom: 16px;
}

/* The round boxes are hidden; the stars are their labels */
.rq-card .rq-star-pick input {
	position: absolute;
	width: 1px; height: 1px;
	opacity: 0;
	margin: 0; padding: 0;
	box-shadow: none;
}

.rq-star-pick label { margin: 0; cursor: pointer; font-size: 34px; line-height: 1; color: #cfe2e3; transition: color 0.15s, transform 0.15s; }
.rq-star-pick label:hover { transform: scale(1.1); }

/* The chosen star and the ones before it; while hovering, the hovered one and the ones before it */
.rq-star-pick input:checked ~ label,
.rq-star-pick label:hover,
.rq-star-pick label:hover ~ label { color: #f5a623; }

.rq-star-pick input:focus-visible + label { outline: 2px solid var(--rq-brand); outline-offset: 3px; border-radius: 6px; }

/* ---------- The paid / delivered record and answers ---------- */
.rq-record {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	font-size: 13.5px;
	font-weight: 600;
}

.rq-record i { font-size: 15px; }
.rq-record b { font-weight: 700; margin-inline-start: 4px; }
.rq-record-good { color: #14825e; }
.rq-record-mixed { color: #8a6400; }
.rq-record-bad { color: #c4384c; }

.rq-record-line { margin: 0 0 14px; }
.rq-record-line:empty { display: none; }

/* The answer on one review: 1 in full, 2 partly, 3 not at all */
.rq-answer { padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.rq-answer-1 { background: #d9f7ea; color: #14825e; }
.rq-answer-2 { background: #fff1cc; color: #8a6400; }
.rq-answer-3 { background: #fde2e6; color: #c4384c; }
.rq-review-top { flex-wrap: wrap; }
.rq-review-top time { margin-inline-start: auto; }

/* The question in the review form: three choices side by side */
.rq-outcome { margin: 0 0 18px; padding: 0; border: none; }
.rq-outcome legend { padding: 0; }

.rq-outcome-choice {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	margin-inline-end: 8px;
	padding: 9px 16px;
	border: 2px solid var(--rq-line);
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	color: var(--rq-ink);
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.rq-card .rq-outcome-choice input {
	width: 16px; height: 16px;
	margin: 0; padding: 0;
	box-shadow: none;
	flex: none;
}

.rq-outcome-choice:hover { border-color: #bfe0e0; }
.rq-outcome-1:has(input:checked) { border-color: #2bb98a; background: #f1fcf7; }
.rq-outcome-2:has(input:checked) { border-color: #e0a800; background: #fffaeb; }
.rq-outcome-3:has(input:checked) { border-color: #e0465a; background: #fef4f5; }
.rq-outcome-1 input { accent-color: #2bb98a; }
.rq-outcome-2 input { accent-color: #e0a800; }
.rq-outcome-3 input { accent-color: #e0465a; }

/* ---------- "Online now" in the chips under a person's name ---------- */
.rq-chips .rq-chip-online { background: rgba(124, 240, 192, 0.2); border-color: rgba(124, 240, 192, 0.5); }
.rq-chips .rq-chip-online b { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #5fe0b0; margin-inline-end: 2px; }
