/**
 * ============================================================================
 * PET APPLICATIONS - COMPLETE STYLING
 * ============================================================================
 * File Path:        public/css/modules/pet-applications.css
 * Version:          1.2.0
 * Created:          Sunday, October 26, 2025, 20:55 AEST
 * Last Modified:    Wednesday, October 29, 2025, 09:15 AEST
 * 
 * Purpose:
 *   Complete styling for pet application screens including combined by-laws
 *   + application form and review & submit screen. Purple theme (#8b5cf6)
 *   with professional, accessible design.
 * 
 * Version History:
 *   1.2.0 (2025-10-29) - MAJOR CLEANUP: Removed all conflicting rules
 *                      - FIXED: Container centering (removed broken transform)
 *                      - FIXED: Single step visibility control (no duplicates)
 *                      - Simplified and consolidated all rules
 *   1.1.2 (2025-10-29) - FIXED: Added align-items property to step 2 container
 *   1.1.1 (2025-10-28) - CRITICAL FIX: Step 2 container now properly centered
 *   1.1.0 (2025-10-28) - CRITICAL FIX: Added .review-container centering
 *   1.0.0 (2025-10-26) - Initial implementation with complete styling
 * 
 * ============================================================================
 */

/* ===== GLOBAL RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
    color: #1f2937;
}

/* ===== MAIN CONTAINER ===== */
.pet-app-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* ===== HEADER ===== */
.pet-header {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

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

.pet-header .subtitle {
    color: #d1d5db;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.pet-header .applicant-info {
    color: #9ca3af;
    font-size: 0.95rem;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pa-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    background: #e5e7eb;
    color: #6b7280;
    transition: all 0.3s ease;
}

.pa-step-active {
    background: #8b5cf6 !important;
    color: white !important;
}

.pa-step-completed {
    background: #10b981 !important;
    color: white !important;
}

.pa-step-inactive {
    background: #e5e7eb !important;
    color: #6b7280 !important;
}

.progress-step span {
    font-weight: 600;
    color: #6b7280;
}

.progress-step.active span {
    color: #8b5cf6;
}

.progress-step.complete span {
    color: #10b981;
}

.progress-line {
    width: 100px;
    height: 3px;
    background: #e5e7eb;
    margin: 0 1rem;
}

.progress-line.complete {
    background: #10b981;
}

/* ===== STEP VISIBILITY CONTROL ===== */
/* Hide all steps by default */
.pa-step {
    display: none !important;
    width: 100%;
}

/* Show active step as block (for Step 1 with grid layout) */
.pa-step.active {
    display: block !important;
}

/* Step 2 gets flex layout when active (for centering) */
.pa-step[data-step="2"].active {
    display: flex !important;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    min-height: 600px;
}

/* ===== CONTENT GRID (FOR STEP 1) ===== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    min-height: 600px;
}

.main-column {
    padding: 2.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.docs-column {
    background: #f9fafb;
    border-left: 3px solid #e5e7eb;
    padding: 2rem;
    position: sticky;
    top: 0;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

/* ===== REVIEW CONTAINER (STEP 2) ===== */
.review-container {
    max-width: 900px;
    width: 100%;
    padding: 2.5rem;
}

/* ===== SECTIONS ===== */
.section {
    margin-bottom: 3rem;
}

.section h3 {
    color: #1f2937;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #8b5cf6;
}

.section-desc {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.intro-section {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #8b5cf6;
}

.intro-section h2 {
    color: #1f2937;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.intro-text {
    color: #374151;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* ===== BY-LAWS CONTENT ===== */
.bylaws-content {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.bylaws-text-list {
    list-style: decimal;
    padding-left: 1.5rem;
    color: #374151;
    line-height: 1.8;
}

.bylaws-text-list li {
    margin-bottom: 0.75rem;
}

.bylaws-text-list li strong {
    color: #1f2937;
}

/* ===== BY-LAWS STATEMENT ===== */
.bylaws-statement {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
}

.statement-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.statement-check {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #3b82f6;
    flex-shrink: 0;
    margin-top: 2px;
}

.statement-text {
    flex: 1;
    color: #1e40af;
    font-weight: 600;
    line-height: 1.6;
    cursor: pointer;
}

/* ===== FORM ELEMENTS ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

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

.required {
    color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.readonly-field {
    background: #f3f4f6 !important;
    cursor: not-allowed;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #8b5cf6;
}

/* ===== INFO/WARNING BOXES ===== */
.info-box,
.warning-box {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    line-height: 1.6;
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

.info-box strong,
.warning-box strong {
    display: block;
    margin-bottom: 0.25rem;
}

.tenant-section {
    margin-top: 1rem;
}

.assistance-box {
    background: #eff6ff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #3b82f6;
    margin-top: 1rem;
}

.assistance-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.assistance-label input {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #3b82f6;
    flex-shrink: 0;
    margin-top: 2px;
}

.assistance-label span {
    font-weight: 600;
    color: #1f2937;
}

.assistance-info {
    padding-top: 1rem;
    border-top: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== TERMS ===== */
.terms-box {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    margin-bottom: 1rem;
}

.terms-list {
    list-style: decimal;
    padding-left: 1.5rem;
    color: #374151;
    line-height: 1.8;
}

.terms-list li {
    margin-bottom: 0.75rem;
}

.terms-accept {
    margin-top: 1rem;
}

.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.terms-check {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #8b5cf6;
    flex-shrink: 0;
    margin-top: 2px;
}

.terms-label span {
    font-weight: 600;
    color: #1f2937;
}

/* ===== DOCUMENT UPLOAD PANEL ===== */
.docs-panel h3 {
    color: #1f2937;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 2px solid #e5e7eb;
}

.progress-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.upload-progress.complete .progress-circle {
    background: #10b981;
    color: white;
}

.progress-text {
    flex: 1;
}

.progress-text strong {
    display: block;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.progress-text span {
    color: #6b7280;
    font-size: 0.9rem;
}

.doc-upload {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.doc-upload:hover {
    border-color: #8b5cf6;
}

.doc-upload.uploaded {
    border-color: #10b981;
    background: #ecfdf5;
}

.doc-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.doc-info {
    text-align: center;
    margin-bottom: 1rem;
}

.doc-info strong {
    display: block;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.doc-info span {
    color: #6b7280;
    font-size: 0.9rem;
}

.file-input {
    display: none;
}

.upload-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: #d1d5db;
}

.doc-upload.uploaded .upload-btn {
    background: #10b981;
    color: white;
}

.file-status {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.doc-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #78350f;
    margin-top: 1.5rem;
}

.doc-warning strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* ===== ACTION BAR ===== */
.action-bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 2.5rem;
    background: #f9fafb;
    border-top: 3px solid #e5e7eb;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.btn-primary:disabled,
.btn-disabled {
    background: #d1d5db !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-submit:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

/* ===== REVIEW SCREEN STYLES ===== */
.review-intro {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-item label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.review-item span {
    color: #1f2937;
    font-size: 1.05rem;
    font-weight: 600;
}

.assistance-badge {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    color: #1e40af;
    font-size: 0.95rem;
    font-weight: 600;
}

.docs-review-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.doc-review-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

.doc-review-icon {
    font-size: 2rem;
}

.doc-review-info {
    flex: 1;
}

.doc-review-info strong {
    display: block;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.doc-review-info .doc-filename {
    color: #10b981;
    font-size: 0.9rem;
    font-weight: 600;
}

.no-documents {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
}

.loading-docs {
    text-align: center;
    color: #6b7280;
    padding: 1rem;
}

.acknowledgment-badge {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #ecfdf5;
    border: 2px solid #10b981;
    border-radius: 8px;
}

.badge-icon {
    font-size: 2rem;
    color: #10b981;
}

.badge-content strong {
    display: block;
    color: #065f46;
    margin-bottom: 0.5rem;
}

.badge-content p {
    color: #047857;
    line-height: 1.6;
    margin: 0;
}

/* ===== FINAL DECLARATION ===== */
.declaration-box {
    background: #fef3c7;
    border: 3px solid #f59e0b;
    border-radius: 8px;
    padding: 2rem;
}

.declaration-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.declaration-check {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
}

.declaration-label span {
    color: #78350f;
    font-weight: 600;
    line-height: 1.7;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-content p strong {
    color: #1f2937;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* ===== BY-LAWS SUMMARY ===== */
.bylaws-summary {
    padding: 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    color: white;
    line-height: 1.6;
}

.bylaws-summary p {
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .docs-column {
        border-left: none;
        border-top: 3px solid #e5e7eb;
        position: static;
        max-height: none;
    }
    
    .form-row,
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .review-container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .pet-header h1 {
        font-size: 1.5rem;
    }
    
    .main-column,
    .review-container {
        padding: 1.5rem;
    }
    
    .action-bar {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .progress-bar {
        padding: 1rem;
    }
    
    .progress-line {
        width: 40px;
    }
}
