/* Frontend Styles for Agency Management Plugin */

.amp-registration-form,
.amp-login-form,
.amp-needs-form,
.amp-support-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.amp-needs-form,
.amp-support-form {
    max-width: 800px;
}

.amp-form h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    font-size: 24px;
}

.amp-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.amp-form-row .amp-form-group {
    flex: 1;
}

.amp-form-group {
    margin-bottom: 15px;
}

.amp-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.amp-form-group input[type="text"],
.amp-form-group input[type="email"],
.amp-form-group input[type="password"],
.amp-form-group select,
.amp-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.amp-form-group input:focus,
.amp-form-group select:focus,
.amp-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0, 124, 186, 0.3);
}

.amp-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.amp-checkbox-label {
    display: flex !important;
    align-items: center;
    font-weight: normal !important;
    cursor: pointer;
}

.amp-radio-group,
.amp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amp-radio-label,
.amp-checkbox-label {
    display: flex !important;
    align-items: center;
    font-weight: normal !important;
    cursor: pointer;
}

.amp-radio-label input[type="radio"],
.amp-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin-right: 8px;
    margin-bottom: 0;
}

.document-row,
.video-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.document-row input,
.video-row input {
    flex: 1;
    margin: 0;
}

.remove-row {
    background: #dc3232 !important;
    color: white !important;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.remove-row:hover {
    background: #a00 !important;
}

.regular-text {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.amp-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin-right: 8px;
    margin-bottom: 0;
}

.amp-button {
    background-color: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    width: 100%;
}

.amp-button:hover {
    background-color: #005a87;
}

.amp-button-primary {
    background-color: #007cba;
}

.amp-button-secondary {
    background-color: #666;
}

.amp-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

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

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

.amp-error ul {
    margin: 0;
    padding-left: 20px;
}

.amp-form-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.amp-form-links {
    text-align: center;
    margin-top: 15px;
}

.amp-form-links a {
    color: #007cba;
    text-decoration: none;
}

.amp-form-links a:hover {
    text-decoration: underline;
}

/* Captcha Styles */
.amp-captcha-question {
    background-color: #f8f9fa;
    border: 2px solid #007cba;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
    text-align: center;
    font-size: 18px;
    color: #333;
}

.amp-captcha-question strong {
    color: #007cba;
    font-size: 20px;
}

.amp-form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {

    .amp-registration-form,
    .amp-login-form {
        margin: 10px;
        padding: 15px;
    }

    .amp-form-row {
        flex-direction: column;
        gap: 0;
    }

    .amp-form h3 {
        font-size: 20px;
    }
}

/* Loading States */
.amp-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.amp-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Validation Styles */
.amp-form-group input.error,
.amp-form-group select.error,
.amp-form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.3);
}

.amp-form-group .error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.amp-form-group input.valid,
.amp-form-group select.valid,
.amp-form-group textarea.valid {
    border-color: #28a745;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
}

/* Search Pages Styles */
.amp-search-needs,
.amp-search-support {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.amp-search-header {
    margin-bottom: 30px;
}

.amp-search-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.amp-search-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.amp-search-filters {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.amp-filter-header {
    margin-bottom: 20px;
}

.amp-filter-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 4px 0;
}

.amp-filter-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.amp-filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.amp-filter-row-search {
    grid-template-columns: repeat(3, 1fr);

}

.amp-filter-group {
    display: flex;
    flex-direction: column;
}

.amp-search-input,
.amp-search-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.amp-search-input:focus,
.amp-search-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.amp-search-results {
    margin-top: 32px;
}

.amp-results-header {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.amp-results-container {
    display: grid;
    gap: 24px;
}

.amp-results-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Need Item Styles */
.amp-need-item,
.amp-support-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.amp-need-item:hover,
.amp-support-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.amp-need-header,
.amp-support-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.amp-need-title,
.amp-support-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.amp-need-meta,
.amp-support-meta {
    font-size: 14px;
    color: #6b7280;
}

.amp-priority-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-critical {
    background: #fef2f2;
    color: #dc2626;
}

.priority-high {
    background: #fef3c7;
    color: #d97706;
}

.priority-medium {
    background: #dbeafe;
    color: #2563eb;
}

.priority-low {
    background: #f0fdf4;
    color: #16a34a;
}

.amp-category-badge {
    background: #f3f4f6;
    color: #374151;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.amp-need-description,
.amp-support-description {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 20px;
}

.amp-need-details,
.amp-support-details {
    margin-bottom: 20px;
}

.amp-need-detail {
    margin-bottom: 8px;
}

.amp-detail-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.category-badge {
    background: #e0f2fe;
    color: #0277bd;
}

.status-badge {
    background: #e8f5e8;
    color: #2e7d32;
}

.amp-support-detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.amp-support-detail strong {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.amp-need-footer,
.amp-support-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.amp-need-info,
.amp-support-info {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.amp-need-value,
.amp-support-value {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
}

.amp-need-actions,
.amp-support-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.amp-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.amp-btn-primary {
    background: #1e40af;
    color: white;
}

.amp-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.amp-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.amp-btn-secondary:hover {
    background: #e5e7eb;
}

.amp-btn-outline {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.amp-btn-outline:hover {
    background: #f9fafb;
    color: #374151;
}

.amp-btn-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.amp-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .amp-filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .amp-need-header,
    .amp-support-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .amp-need-footer,
    .amp-support-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .amp-need-actions,
    .amp-support-actions {
        width: 100%;
        justify-content: stretch;
    }

    .amp-btn {
        flex: 1;
        justify-content: center;
    }

    .amp-support-detail-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Admin Search Styles */
.amp-admin-search-filters {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.amp-admin-search-results {
    margin-top: 20px;
}

#admin-needs-count,
#admin-support-count {
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
}

/* Modal Overlay Styles */
.amp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.amp-overlay-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }

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

.amp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.amp-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
}

.amp-close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.amp-close-modal:hover {
    background: #e5e7eb;
    color: #374151;
    transform: scale(1.1);
}

.amp-modal-body {
    padding: 30px;
    line-height: 1.6;
}

.amp-loading-spinner {
    text-align: center;
    padding: 60px;
    font-size: 18px;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.amp-loading-spinner::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Modal responsive design */
@media (max-width: 768px) {
    .amp-overlay {
        padding: 10px;
    }

    .amp-overlay-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .amp-modal-header {
        padding: 15px 20px;
    }

    .amp-modal-header h2 {
        font-size: 20px;
    }

    .amp-modal-body {
        padding: 20px;
    }
}

