/* Agent Search Styles */

.agent-search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.agent-search-container .form-item-agent-code {
    margin-bottom: 20px;
}

.agent-code-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.agent-code-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.agent-search-container .form-actions {
    text-align: center;
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background-color: #0073aa;
    color: white;
}

.btn-primary:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.3);
}

/* Results Styles */

.agent-results-container {
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.agent-info-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agent-info-title {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.agent-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agent-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.agent-field:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.field-value {
    font-weight: 400;
    color: #333;
    flex: 1;
    text-align: right;
    font-size: 16px;
}

/* Error Messages */

.messages--error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 16px;
    border-radius: 4px;
    margin: 16px 0;
    animation: fadeInUp 0.4s ease-out;
}

.messages--status {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 16px;
    border-radius: 4px;
    margin: 16px 0;
}

/* Responsive Design */

@media (max-width: 768px) {
    .agent-search-container,
    .agent-results-container {
        margin: 0 16px;
        max-width: none;
    }

    .agent-info-card {
        padding: 16px;
    }

    .agent-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .field-value {
        text-align: left;
    }

    .agent-code-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading State */

.form-item-agent-code.is-loading .agent-code-input {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZT0iIzk5OSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtZGFzaGFycmF5PSI0IDQiLz4KPGFUIMATEDU+CjxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0icm90YXRlIiB2YWx1ZXM9IjAgOCA4OzM2MCA4IDgiIGR1cj0iMXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+Cjwvc3ZnPgo=');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
}

/* Focus and accessibility improvements */

.agent-code-input:focus,
.btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */

@media (prefers-contrast: high) {
    .agent-search-container {
        border: 2px solid #000;
    }

    .agent-info-card {
        border: 2px solid #000;
    }

    .btn-primary {
        border: 2px solid #000;
    }
}