/* Search page specific styles */
.search-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.home-link {
    position: absolute;
    top: 0;
    left: 0;
}

.home-link-text {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.home-link-text:hover {
    color: #764ba2;
    text-decoration: underline;
}

.header h1 {
    margin-bottom: 0.5rem;
}

.nav-buttons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 0.5rem;
}

.nav-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.search-section {
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box .btn {
    padding: 0.75rem 2rem;
    white-space: nowrap;
}

.search-results {
    margin-top: 2rem;
}

.search-results h3 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.2rem;
}

.related-persons h3 {
    margin-bottom: 0.5rem !important;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.result-content {
    flex: 1;
    margin-left: 1rem;
}

.result-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.result-name {
    margin: 0;
    color: #333;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border: 2px solid #667eea;
    border-radius: 8px;
    display: inline-block;
    background: rgba(102, 126, 234, 0.05);
}

.result-details {
    margin: 0 0 0.75rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.result-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-meta span {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.result-actions {
    margin-left: 1rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.65rem 1.25rem;
    font-size: 1rem;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-results .emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .search-container {
	padding: 1rem;
	margin: 0.5rem;
    }

    .header {
	margin-bottom: 1.5rem;
    }

    .header h1 {
	font-size: 1.8rem;
	margin-bottom: 0.5rem;
    }

    .home-link {
	position: static;
	margin-bottom: 1rem;
	text-align: center;
    }

    .nav-buttons {
	position: static;
	justify-content: center;
	margin-bottom: 1rem;
	flex-wrap: wrap;
    }

    .nav-buttons .btn {
	flex: 1;
	min-width: 120px;
    }

    .search-box {
	flex-direction: column;
	gap: 0.75rem;
    }

    .search-box input {
	padding: 0.8rem;
    }

    .search-box .btn {
	width: 100%;
	padding: 0.8rem;
    }

    .result-item {
	flex-direction: column;
	align-items: stretch;
	padding: 1rem;
    }

    .result-actions {
	margin-left: 0;
	margin-top: 1rem;
	text-align: center;
    }

    .result-meta {
	gap: 0.5rem;
    }

    .result-meta span {
	font-size: 0.75rem;
	padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .search-container {
	padding: 0.75rem;
    }

    .header h1 {
	font-size: 1.6rem;
    }

    .result-item {
	padding: 0.75rem;
    }

    .result-name {
	font-size: 1rem;
    }

    .result-details {
	font-size: 0.85rem;
    }
}

.results-list .result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.result-thumb {
  width: 140px;
  height: 140px;
  flex: 0 0 140px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  font-size: 70px;
  line-height: 1;
  opacity: 0.7;
}
