/*
 * Copyright (c) 2022 Ford Motor Company
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@use '../../Styles/main';

.assignee-container {
	margin: 2px 18px 18px;

	background-color: inherit;

	position: relative;

	&.opacity {
		opacity: 0.25;
	}

	.label {
		color: rgba(main.$asphalt, 0.5);
		font-size: 0.7rem;
		text-transform: lowercase;

		cursor: default;
	}

	.assignee {
		width: 100%;
		height: 22px;
		padding-right: 25px;
		padding-left: 0;

		color: main.$black;
		font-weight: bold;
		font-size: 0.8rem;

		text-overflow: ellipsis;

		background-color: inherit;
		border: 0;
		border-bottom: 2px solid main.$yellow;
		border-radius: 0;
		outline: none;

		transition: border-bottom-color 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);

		+ .floating-character-countdown {
			visibility: hidden;

			bottom: 2px;
			right: 0;
		}

		&:focus:not(:read-only) {
			border-bottom-color: main.$teal;

			+ .floating-character-countdown {
				visibility: visible;
			}
		}

		@media only screen and (max-width: 610px) {
			font-size: 1rem;
		}

		@media screen and (prefers-reduced-motion: reduce) {
			transition: none;
		}
	}
}

@include main.dark-theme {
	.assignee-container {
		.label {
			color: main.$gray-2;
		}

		.assignee {
			color: main.$off-white;
			border-bottom-color: main.$dark-yellow;

			&:focus:not(:read-only) {
				border-bottom-color: main.$sea-foam;
			}
		}
	}
}
