/* Clubwear Manager Frontend Styles */
.cwm-frontend-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Multi-step form styles */
.cwm-step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.cwm-step {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #6b7280;
}

.cwm-step.active {
    background: #3b82f6;
    color: white;
}

.cwm-step.completed {
    background: #10b981;
    color: white;
}

/* Verification specific styles */
.cwm-code-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.25rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.cwm-input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

.cwm-verification-timer {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.cwm-timer-text {
    color: #92400e;
    font-weight: 500;
}

.cwm-timer-countdown {
    color: #92400e;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.cwm-timer-expired {
    background: #fee2e2;
    border-color: #dc2626;
}

.cwm-timer-expired .cwm-timer-text,
.cwm-timer-expired .cwm-timer-countdown {
    color: #991b1b;
}

.cwm-timer-warning {
    background: #fed7aa;
    border-color: #ea580c;
}

.cwm-timer-warning .cwm-timer-text,
.cwm-timer-warning .cwm-timer-countdown {
    color: #9a3412;
}

.cwm-form-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.cwm-link-button {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.cwm-link-button:hover {
    color: #2563eb;
}

.cwm-link-button:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.cwm-lookup-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.cwm-form-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.cwm-form-description {
    margin: 0 0 1.5rem 0;
    color: #6b7280;
    line-height: 1.5;
}

.cwm-form-group {
    margin-bottom: 1.5rem;
}

.cwm-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.cwm-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

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

.cwm-form-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    width: 100%;
}

.cwm-form-button:hover:not(:disabled) {
    background: #2563eb;
}

.cwm-form-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.cwm-button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cwm-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: cwm-spin 1s linear infinite;
}

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

/* Results Styles */
.cwm-results-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.cwm-member-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #3b82f6;
}

.cwm-member-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.cwm-member-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.cwm-member-detail {
    display: flex;
    flex-direction: column;
}

.cwm-detail-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.cwm-detail-value {
    font-size: 1rem;
    color: #1f2937;
    font-weight: 500;
}

.cwm-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cwm-stat-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.cwm-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    display: block;
}

.cwm-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.cwm-items-section {
    margin-top: 2rem;
}

.cwm-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cwm-items-grid {
    display: grid;
    gap: 1rem;
}

.cwm-item-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.15s ease-in-out;
}

.cwm-item-card.returned {
    border-color: #d1d5db;
    background: #f9fafb;
    opacity: 0.7;
}

.cwm-item-card.active {
    border-color: #10b981;
}

.cwm-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cwm-item-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.cwm-item-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.cwm-status-active {
    background: #d1fae5;
    color: #065f46;
}

.cwm-status-returned {
    background: #fee2e2;
    color: #991b1b;
}

.cwm-item-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.cwm-item-detail {
    display: flex;
    flex-direction: column;
}

.cwm-item-detail-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.cwm-item-detail-value {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 500;
    margin-top: 0.25rem;
}

.cwm-item-notes {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.cwm-notes-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
}

.cwm-notes-text {
    font-size: 0.875rem;
    color: #1f2937;
    line-height: 1.5;
}

/* Error Styles */
.cwm-error-container {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.cwm-error-message {
    color: #991b1b;
    font-weight: 500;
    margin-bottom: 1rem;
}

.cwm-error-close {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
}

.cwm-error-close:hover {
    background: #dc2626;
}

/* Success message */
.cwm-success-container {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #166534;
}

/* No items message */
.cwm-no-items {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.cwm-no-items-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cwm-no-items-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.cwm-no-items-text {
    font-size: 1rem;
    line-height: 1.5;
}

/* Back to form button */
.cwm-back-button {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background-color 0.15s ease-in-out;
}

.cwm-back-button:hover {
    background: #374151;
}

/* Filter toggles */
.cwm-filter-toggles {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cwm-filter-toggle {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.cwm-filter-toggle.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.cwm-filter-toggle:hover {
    background: #e5e7eb;
}

.cwm-filter-toggle.active:hover {
    background: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cwm-frontend-container {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
    
    .cwm-lookup-form,
    .cwm-results-container {
        padding: 1.5rem;
    }
    
    .cwm-member-details {
        grid-template-columns: 1fr;
    }
    
    .cwm-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cwm-item-details {
        grid-template-columns: 1fr;
    }
    
    .cwm-item-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .cwm-filter-toggles {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .cwm-lookup-form,
    .cwm-back-button,
    .cwm-filter-toggles {
        display: none !important;
    }
    
    .cwm-results-container {
        box-shadow: none;
        border: 1px solid #000;
        margin-top: 0;
    }
    
    .cwm-item-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ccc !important;
        margin-bottom: 1rem;
    }
    
    .cwm-frontend-container {
        max-width: none;
        padding: 0;
        margin: 0;
    }
}