/**
 * Form Page Styles
 * 
 * @package TTG
 * @since 1.0.7
 */

/* Prevent theme styles from affecting this page */
.ttg-form-page * {
    box-sizing: border-box;
}

/* Additional overrides if needed */
.ttg-form-page {
    font-family: 'Vazirmatn', sans-serif !important;
    background: #f3f4f6 !important;
    min-height: 100vh;
    display: block;
    padding: 16px;
}

/* Form Container */
.ttg-form-container {
    background: white;
    width: 100%;
    max-width: 896px;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    overflow: hidden;
}

/* Desktop: Increase width */
@media (min-width: 1024px) {
    .ttg-form-container {
        max-width: 1200px;
    }
    
    .ttg-form-page-content {
        max-width: 1200px;
    }
}

/* Large Desktop: Even wider for content box */
@media (min-width: 1280px) {
    .ttg-form-page-content {
        max-width: 1400px;
    }
}

/* Page Content Container - Display below form */
.ttg-form-page-content {
    clear: both;
    display: block;
    width: 100%;
    max-width: 896px;
    margin: 40px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Desktop: Increase width for page content */
@media (min-width: 1024px) {
    .ttg-form-page-content {
        max-width: 1200px;
    }
}

/* Header Section */
.ttg-form-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.ttg-form-header h1 {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #1f2937;
    margin-bottom: 8px;
}

.ttg-form-header p {
    text-align: center;
    color: #6b7280;
    margin-bottom: 32px;
}

/* Progress Bar */
.ttg-progress-bar {
    display: flex;
    align-items: center;
}

.ttg-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.ttg-progress-label {
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

.ttg-progress-label.active {
    color: #9333ea;
}

.ttg-progress-label.inactive {
    color: #6b7280;
}

.ttg-progress-line {
    flex: 1;
    margin: 0 16px;
}

/* Form Content */
.ttg-form-content {
    padding: 24px 32px;
}

.ttg-form-step h2 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 24px;
}

.ttg-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .ttg-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ttg-form-grid-full {
    grid-column: 1 / -1;
}

/* Error Message */
.ttg-error-message {
    display: none;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.ttg-error-message.show {
    display: block;
}

/* Navigation Buttons */
.ttg-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.ttg-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 100px;
}

.ttg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.ttg-btn-prev {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.ttg-btn-prev:hover:not(:disabled) {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

.ttg-btn-next {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.ttg-btn-next:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.ttg-btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.ttg-btn-submit:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Success Message */
.ttg-success-message {
    text-align: center;
    padding: 48px 0;
}

.ttg-success-icon {
    width: 64px;
    height: 64px;
    color: #10b981;
    margin: 0 auto;
}

.ttg-success-message h2 {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-top: 16px;
}

.ttg-success-message p {
    color: #4b5563;
    margin-top: 8px;
}

/* Helper Text */
.ttg-helper-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Mobile: Reduce font sizes for less important elements */
@media (max-width: 767px) {
    .ttg-helper-text {
        font-size: 11px;
    }
    
    .ttg-progress-label {
        font-size: 12px;
    }
    
    .ttg-form-header p {
        font-size: 13px;
    }
    
    .form-label {
        font-size: 13px;
    }
    
    .ttg-form-step h2 {
        font-size: 18px;
    }
    
    .ttg-form-content {
        padding: 20px 16px;
    }
    
    .ttg-form-header {
        padding: 20px 16px;
    }
    
    .ttg-form-header h1 {
        font-size: 20px;
    }
}

/* Radio Options Grid */
.ttg-radio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 8px;
}

@media (min-width: 768px) {
    .ttg-radio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-red-500 {
    color: #ef4444;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.text-purple-600 {
    color: #9333ea;
}

.text-green-500 {
    color: #10b981;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mt-8 {
    margin-top: 32px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.ml-3 {
    margin-left: 12px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.py-12 {
    padding-top: 48px;
    padding-bottom: 48px;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.py-3 {
    padding-top: 12px;
    padding-bottom: 12px;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.z-10 {
    z-index: 10;
}

.cursor-help {
    cursor: help;
}

.pointer-events-none {
    pointer-events: none;
}

.opacity-0 {
    opacity: 0;
}

.group:hover .group-hover-opacity-100 {
    opacity: 1;
}

/* Group hover effect */
.group {
    position: relative;
}

.group:hover > div:last-child {
    opacity: 1;
}

.transition-opacity {
    transition: opacity 0.3s;
}

.duration-300 {
    transition-duration: 0.3s;
}

.bottom-full {
    bottom: 100%;
}

.mb-2 {
    margin-bottom: 8px;
}

.w-64 {
    width: 256px;
}

.bg-gray-800 {
    background: #1f2937;
}

.text-white {
    color: white;
}

.text-xs {
    font-size: 12px;
}

.rounded-lg {
    border-radius: 8px;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.right-4 {
    right: 16px;
}

.w-5 {
    width: 20px;
}

.h-5 {
    height: 20px;
}

.w-16 {
    width: 64px;
}

.h-16 {
    height: 64px;
}

