@import url(root.css);

.assignment {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    padding: 20px;
    border-radius: 8px;
}

.assignment-section {
    margin-bottom: 40px;
}

.assignment-section .form-label {
    margin-bottom: 0 !important;
}

.assignment-section h5 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.assignment-section .form-group {
    transition: all 0.3s ease;
}

.assignment-section .form-check {
    margin-bottom: 10px;
}

.custom-input:focus-within,
.form-group:focus-within,
.dropdown-search:focus-within,
.input-search:focus-within {
    border-radius: none;
    color: initial;
    border-color: none;
    box-shadow: none;
    outline: none;
    transition: none;
}

.selected-countries-container {
    min-height: 20px;
    transition: all 0.3s ease;
    display: none;
    /* Hidden by default */
    position: relative;
}

.selected-countries-container.has-countries {
    display: block;
    /* Show when countries are present */
}

.selected-country-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--masta-sea-blue-10, #f0f8ff);
    border: 1px solid var(--masta-sea-blue-60, #87ceeb);
    border-radius: 20px;
    padding: 3px 6px;
    margin: 4px 8px 4px 0;
    color: var(--masta-sea-blue-120, #003d5c);
    transition: all 0.2s ease;
    transform-origin: left center;
}

.selected-country-tag span {
    font-size: 12px !important;
}

.selected-country-tag:hover {
    background: var(--masta-sea-blue-20, #e6f3ff);
    border-color: var(--masta-sea-blue-80, #5bb3d9);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

/* Removal animation */
.selected-country-tag.removing {
    animation: slideOut 0.2s ease-in forwards;
    pointer-events: none;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(-20px) scale(0.8);
    }
}

.country-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.country-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.remove-country-btn {
    background: none;
    border: none;
    color: var(--masta-sea-blue-100, #0066cc);
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
}

.remove-country-btn i {
    font-size: 12px !important;
}

.remove-country-btn:hover {
    background: var(--masta-sea-blue-20, #e6f3ff);
    color: var(--masta-sea-blue-120, #003d5c);
    opacity: 1;
    transform: scale(1.1);
}

.remove-country-btn:focus {
    outline: 2px solid var(--masta-sea-blue-80, #5bb3d9);
    outline-offset: 1px;
    opacity: 1;
}

.remove-country-btn:active {
    transform: scale(0.95);
}

/* Country count display */
.countries-count {
    font-size: 12px;
    color: var(--masta-cool-grey-80, #666);
    font-weight: 500;
    transition: color 0.2s ease;
    display: none;
    /* Hidden by default */
}

.countries-count:not(:empty) {
    color: var(--masta-sea-blue-100, #0066cc);
}

.countries-count-wrapper {
    min-height: 0;
    transition: all 0.2s ease;
}

.countries-count-wrapper:empty {
    display: none;
}

/* Empty state */
.empty-state-text {
    font-style: italic;
    color: var(--masta-cool-grey-60, #999);
    padding: 8px 0;
    text-align: center;
    opacity: 0.7;
}

/* Removal feedback */
.country-removal-feedback {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--masta-success-green, #28a745);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    animation: fadeInOut 2s ease-in-out forwards;
    pointer-events: none;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }

    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
}

.selected-countries-container:empty::after {
    content: '';
    display: block;
    height: 0;
}

/* Validation messages */
.validation-message {
    animation: slideInTop 0.3s ease-out;
    border-left: 3px solid var(--masta-warning-yellow-80, #ffc107);
}

@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .selected-country-tag {
        margin: 2px 4px 2px 0;
        padding: 4px 8px;
        font-size: 13px;
    }

    .country-name {
        max-width: 100px;
    }

    .remove-country-btn {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .selected-country-tag {
        border-width: 2px;
    }

    .remove-country-btn {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .selected-country-tag,
    .remove-country-btn,
    .country-removal-feedback {
        animation: none;
        transition: none;
    }

    .selected-country-tag:hover {
        transform: none;
    }
}

.list-item-icon {
    position: relative;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: var(--masta-sky-blue-20);
    color: var(--masta-sea-blue-100);
    font-size: 20px;
    text-align: center;
    border-radius: 50px;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.list-item-icon i {
    font-size: 16px !important;
}

/* .masta-logged-in h5 {
    font-weight: 700;
    font-size: 14px;
    margin-top: 3px;
    color: white;
}
.masta-logged-in h5:before {
    position: absolute;
    right: -12px;
    bottom: 2px;
    font-family: 'masta' !important;
    font-size: 10px;
    color: var(--masta-cool-grey-6C);
    content: '\e97d';
    transition: 0.5s all ease;
    color: white;
}

.masta-logged-in .truncate-name {
    font-weight: 400;
    font-size: 14px;
    min-width: 75px;
    color: white;
} */
