/* استایل های صفحه استعلام بلیط */

/* ساختار کلی */
body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.verify-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* هدر صفحه */
.verify-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 700;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #0066CC;
}

.logo i {
    margin-left: 8px;
    font-size: 22px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* محتوای اصلی */
.verify-content {
    flex: 1;
    padding: 30px 0 50px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0a1a35;
    margin-bottom: 10px;
}

.page-header .subtitle {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 0;
}

/* دمو نوتیفیکیشن */
.demo-notification {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
}

.demo-notification i {
    margin-left: 12px;
    font-size: 20px;
    margin-top: 3px;
}

.demo-notification p {
    margin-bottom: 0;
    margin-top: 5px;
}

.demo-notification code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

/* بخش اصلی استعلام */
.verify-box {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow: hidden;
}

/* تب بندی */
.verify-tabs {
    display: flex;
    flex-direction: column;
}

.tab-header {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tab-item {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-item i {
    margin-left: 8px;
    font-size: 16px;
}

.tab-item:hover {
    background-color: #f1f3f5;
    color: #495057;
}

.tab-item.active {
    color: #0066CC;
    border-bottom-color: #0066CC;
    background-color: #ffffff;
}

.tab-content {
    padding: 25px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* فرم استعلام با کد */
.verify-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    color: #0a1a35;
    margin-bottom: 8px;
}

.input-group {
    position: relative;
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #ddd;
    color: #0066CC;
}

.form-control {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #0066CC;
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.invalid-feedback {
    display: none;
    font-size: 12px;
    color: #dc3545;
    margin-top: 5px;
}

.is-invalid .invalid-feedback {
    display: block;
}

.is-invalid .form-control {
    border-color: #dc3545;
}

/* کپچا */
.captcha-group {
    display: flex;
    flex-direction: column;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.captcha-box {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    padding: 10px 15px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    width: 150px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(0, 0, 0, 0.03) 5px, rgba(0, 0, 0, 0.03) 10px);
}

.captcha-text {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #0a1a35;
    letter-spacing: 3px;
    user-select: none;
    position: relative;
    transform: skew(-5deg);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.refresh-captcha {
    padding: 8px 10px;
    height: 50px;
}

.captcha-input {
    flex: 1;
}

/* دکمه های فرم */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn i {
    margin-left: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-primary {
    background-color: #0066CC;
    border-color: #0066CC;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0055b3;
    border-color: #0055b3;
}

.btn-outline-primary {
    border: 1px solid #0066CC;
    color: #0066CC;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #0066CC;
    color: #ffffff;
}

.btn-outline-secondary {
    border: 1px solid #6c757d;
    color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-outline-danger {
    border: 1px solid #dc3545;
    color: #dc3545;
    background-color: transparent;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: #ffffff;
}

.btn-verify {
    min-width: 150px;
}

/* بخش استعلام با اسکن */
.scan-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.scan-area {
    aspect-ratio: 1/1;
    max-width: 300px;
    margin: 0 auto;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.scan-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.scan-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px dashed #6c757d;
    margin: 30px;
}

.scan-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #0066CC;
    border-style: solid;
    border-width: 0;
}

.top-left {
    top: 30px;
    left: 30px;
    border-top-width: 3px;
    border-left-width: 3px;
}

.top-right {
    top: 30px;
    right: 30px;
    border-top-width: 3px;
    border-right-width: 3px;
}

.bottom-left {
    bottom: 30px;
    left: 30px;
    border-bottom-width: 3px;
    border-left-width: 3px;
}

.bottom-right {
    bottom: 30px;
    right: 30px;
    border-bottom-width: 3px;
    border-right-width: 3px;
}

.scan-line {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    height: 2px;
    background-color: rgba(0, 102, 204, 0.5);
    animation: scanLine 2s linear infinite;
}

@keyframes scanLine {
    0% {
        top: 30px;
    }
    50% {
        top: calc(100% - 30px - 2px);
    }
    100% {
        top: 30px;
    }
}

.scan-icon {
    font-size: 50px;
    color: #6c757d;
    opacity: 0.5;
}

.scan-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.scan-video-container.active {
    display: block;
}

#scan-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.or-divider {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 14px;
    width: 100%;
    margin: 5px 0;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e9ecef;
}

.or-divider::before {
    margin-left: 10px;
}

.or-divider::after {
    margin-right: 10px;
}

.upload-qr {
    width: 100%;
    text-align: center;
}

.upload-qr label {
    width: 100%;
    margin: 0;
}

.scan-guide {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-right: 4px solid #0066CC;
}

.scan-guide h5 {
    font-size: 16px;
    font-weight: 600;
    color: #0a1a35;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.scan-guide h5 i {
    margin-left: 8px;
    color: #0066CC;
}

.scan-guide ul {
    margin: 0;
    padding-right: 20px;
}

.scan-guide li {
    margin-bottom: 5px;
    font-size: 14px;
    color: #495057;
}

.scan-guide li:last-child {
    margin-bottom: 0;
}

/* بخش نتیجه استعلام */
.verify-result {
    display: none;
    margin-bottom: 30px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-box {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.result-icon {
    flex-shrink: 0;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.valid-result .icon-circle {
    background-color: rgba(0, 170, 85, 0.1);
    color: #00AA55;
    animation: pulseSuccess 2s infinite;
}

.invalid-result .icon-circle {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    animation: pulseError 2s infinite;
}

@keyframes pulseSuccess {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 170, 85, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 170, 85, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 170, 85, 0);
    }
}

@keyframes pulseError {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.result-content {
    flex: 1;
}

.result-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.valid-result .result-title {
    color: #00AA55;
}

.invalid-result .result-title {
    color: #dc3545;
}

.ticket-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    align-items: baseline;
}

.info-label {
    font-weight: 600;
    color: #495057;
    width: 120px;
    flex-shrink: 0;
}

.info-value {
    font-weight: 500;
    color: #0a1a35;
}

.ownership-row {
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px dashed #e9ecef;
}

.status-row {
    margin-top: 5px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: rgba(0, 170, 85, 0.1);
    color: #00AA55;
    font-weight: 600;
    font-size: 14px;
}

.invalid-reason {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #495057;
}

.invalid-actions {
    display: flex;
    gap: 15px;
}

/* بخش راهنما */
.guide-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #0a1a35;
    margin-bottom: 20px;
    position: relative;
    padding-right: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 0;
    width: 5px;
    height: 20px;
    background-color: #0066CC;
    border-radius: 3px;
}

.accordion-item {
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    margin: 0;
}

.accordion-button {
    padding: 15px 20px;
    font-weight: 600;
    color: #0a1a35;
    background-color: #ffffff;
}

.accordion-button:not(.collapsed) {
    color: #0066CC;
    background-color: rgba(0, 102, 204, 0.05);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: #e9ecef;
}

.accordion-body {
    padding: 15px 20px;
    background-color: #ffffff;
    color: #495057;
}

.accordion-body p {
    margin-bottom: 15px;
}

.accordion-body ul,
.accordion-body ol {
    padding-right: 20px;
}

.accordion-body li {
    margin-bottom: 8px;
}

/* فوتر */
.verify-footer {
    background-color: #ffffff;
    padding: 20px 0;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.copyright {
    font-size: 14px;
    color: #6c757d;
}

.security-badges {
    display: flex;
    gap: 15px;
}

.badge {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #6c757d;
}

.badge i {
    margin-left: 5px;
    color: #0066CC;
}

/* مودال لودینگ */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-modal.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid rgba(0, 102, 204, 0.1);
    border-radius: 50%;
    border-top-color: #0066CC;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    color: #0a1a35;
}

/* ریسپانسیو */
@media (max-width: 991px) {
    .page-header h1 {
        font-size: 24px;
    }
    
    .page-header .subtitle {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .verify-header {
        padding: 10px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .result-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .info-row {
        flex-direction: column;
        align-items: center;
    }
    
    .info-label {
        width: auto;
        margin-bottom: 5px;
    }
    
    .invalid-actions {
        flex-direction: column;
    }
    
    .invalid-actions .btn {
        width: 100%;
    }
    
    .captcha-group {
        flex-direction: column;
    }
    
    .captcha-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 575px) {
    .tab-item {
        padding: 10px;
        font-size: 14px;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .security-badges {
        justify-content: center;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}