/* assets/certificate-search.css */

/* استایل‌های کلی فرم جستجو */
#certificate-search-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
}

/* گروه ورودی جستجو */
.search-input-group {
    text-align: center;
    margin-bottom: 20px;
}

.search-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.input-button-group {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cert-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-left: none;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.cert-input:focus {
    border-color: #0073aa;
}

.cert-search-btn {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    min-width: 100px;
    transition: all 0.3s ease;
    position: relative;
}

.cert-search-btn:hover {
    background: linear-gradient(135deg, #005a87, #0073aa);
    transform: translateY(-1px);
}

.cert-search-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* انیمیشن لودینگ */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* کانتینر نتایج */
.cert-result-container {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* گواهینامه یافت شد */
.certificate-found {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.certificate-found::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #20c997, #28a745);
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

.cert-success-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cert-message {
    font-size: 16px;
    color: #155724;
    margin-bottom: 20px;
    line-height: 1.6;
    font-weight: 500;
}

/* جزئیات گواهینامه */
.cert-details {
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: right;
}

.cert-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.cert-field:last-child {
    border-bottom: none;
}

.cert-field label {
    font-weight: bold;
    color: #495057;
    min-width: 140px;
}

.cert-field span {
    color: #333;
    font-weight: 500;
}

/* گواهینامه یافت نشد */
.certificate-not-found {
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.cert-error-icon {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 15px;
}

.certificate-not-found .cert-message {
    color: #721c24;
    font-size: 18px;
    font-weight: 500;
}

/* دکمه جستجوی جدید */
.new-search-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.new-search-btn:hover {
    background: linear-gradient(135deg, #495057, #6c757d);
    transform: translateY(-1px);
}

/* آمار جستجو */
.cert-stats {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

/* استایل‌های ریسپانسیو */
@media (max-width: 768px) {
    .input-button-group {
        flex-direction: column;
        max-width: 300px;
    }
    
    .cert-input {
        border-left: 2px solid #ddd;
        border-bottom: none;
        border-radius: 8px 8px 0 0;
    }
    
    .cert-search-btn {
        border-radius: 0 0 8px 8px;
    }
    
    .cert-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .cert-field label {
        min-width: auto;
    }
}

/* استایل‌های متنوع */
.cert-search-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    color: white;
}

.cert-search-modern .search-label,
.cert-search-modern .cert-input,
.cert-search-modern .cert-search-btn {
    color: white;
}

.cert-search-modern .cert-input {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
}

.cert-search-modern .cert-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.cert-search-minimal {
    border: none;
    background: none;
    padding: 20px 0;
}

.cert-search-minimal .cert-input {
    border: none;
    border-bottom: 2px solid #ddd;
    border-radius: 0;
    background: none;
    padding: 10px 0;
}

.cert-search-minimal .cert-search-btn {
    background: none;
    color: #0073aa;
    border: 2px solid #0073aa;
    border-radius: 25px;
}