/**
 * FriendShyft Volunteer Portal Styles
 * Loading states, messages, and UI enhancements
 */

/* Loading Spinner */
.fs-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: fs-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes fs-spin {
    to { transform: rotate(360deg); }
}

/* Loading Button State */
.fs-loading {
    opacity: 0.7;
    cursor: wait !important;
    pointer-events: none;
}

/* Messages */
.fs-message {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 4px;
    border-left: 4px solid;
    font-size: 14px;
    line-height: 1.5;
    animation: fs-slide-in 0.3s ease;
}

.fs-message.fs-error {
    background-color: #fef2f2;
    border-color: #dc2626;
    color: #991b1b;
}

.fs-message.fs-success {
    background-color: #f0fdf4;
    border-color: #16a34a;
    color: #15803d;
}

.fs-message.fs-warning {
    background-color: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.fs-message.fs-info {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

@keyframes fs-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button States */
.fs-signup-btn,
.fs-cancel-signup-btn,
.fs-complete-step-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.fs-signup-btn {
    background-color: #2563eb;
    color: white;
}

.fs-signup-btn:hover:not(:disabled) {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.fs-signup-btn:disabled,
.fs-signup-btn.fs-signed-up {
    background-color: #16a34a;
    cursor: not-allowed;
    opacity: 0.8;
}

.fs-cancel-signup-btn {
    background-color: #dc2626;
    color: white;
}

.fs-cancel-signup-btn:hover:not(:disabled) {
    background-color: #b91c1c;
}

.fs-complete-step-btn {
    background-color: #16a34a;
    color: white;
}

.fs-complete-step-btn:hover:not(:disabled) {
    background-color: #15803d;
}

/* Workflow Step States */
.fs-workflow-step {
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.fs-workflow-step.fs-completed {
    background-color: #f0fdf4;
    border-color: #16a34a;
    opacity: 0.7;
}

.fs-workflow-step.fs-completed .fs-complete-step-btn {
    background-color: #9ca3af;
}

/* Portal Sections */
.fs-portal-section {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fs-portal-section h2 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #111827;
    font-size: 20px;
}

.fs-portal-section h3 {
    margin-top: 16px;
    margin-bottom: 12px;
    color: #374151;
    font-size: 16px;
}

/* Empty States */
.fs-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.fs-empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.fs-empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.fs-empty-state-subtext {
    font-size: 14px;
    color: #9ca3af;
}

/* Opportunity Cards */
.fs-opportunity {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

.fs-opportunity:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.fs-opportunity-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
}

.fs-opportunity-details {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.fs-opportunity-actions {
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .fs-portal-section {
        padding: 16px;
    }

    .fs-signup-btn,
    .fs-cancel-signup-btn,
    .fs-complete-step-btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Accessibility */
.fs-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus States */
.fs-signup-btn:focus,
.fs-cancel-signup-btn:focus,
.fs-complete-step-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
