/* Foxentry Integration Plugin - Frontend Styles */

.foxentry-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.foxentry-form {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.foxentry-field-wrapper {
    margin-bottom: 15px;
}

.foxentry-form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.foxentry-submit-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.foxentry-submit-btn:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
}

.foxentry-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.foxentry-form-status {
    font-size: 14px;
    font-weight: 500;
    min-height: 20px;
}

.foxentry-form-status.success {
    color: #28a745;
}

.foxentry-form-status.error {
    color: #dc3545;
}

.foxentry-form-status.loading {
    color: #f39c12;
}

.foxentry-validator {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-sizing: border-box;
}

.foxentry-validator:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.foxentry-validator.validating {
    border-color: #f39c12;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8Y2lyY2xlIGN4PSIxMCIgY3k9IjEwIiByPSI4IiBmaWxsPSJub25lIiBzdHJva2U9IiNmMzljMTIiIHN0cm9rZS13aWR0aD0iMiI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UtZGFzaGFycmF5IiBkdXI9IjJzIiB2YWx1ZXM9IjAgNTA7MjUgMjU7MCA1MCIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4KICA8L2NpcmNsZT4KPC9zdmc+');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px 20px;
    padding-right: 45px;
}

.foxentry-validator.valid {
    border-color: #28a745;
    background-color: #f8fff9;
}

.foxentry-validator.invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.foxentry-result {
    margin-top: 8px;
    padding: 0;
    min-height: 20px;
    transition: all 0.3s ease;
    display: block !important;
    visibility: visible !important;
}

.foxentry-result.loading {
    color: #f39c12;
    font-size: 14px;
}

.foxentry-result.valid {
    color: #28a745;
    font-size: 14px;
    font-weight: 500;
}

.foxentry-result.invalid {
    color: #dc3545;
    font-size: 14px;
    font-weight: 500;
}

.foxentry-result.valid::before {
    content: "✅ ";
    font-weight: bold;
    font-size: 16px;
}

.foxentry-result.invalid::before {
    content: "❌ ";
    font-weight: bold;
    font-size: 16px;
}

.foxentry-result.loading::before {
    content: "⟳ ";
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* Responsivní design */
@media (max-width: 768px) {
    .foxentry-validator {
        font-size: 16px; /* Zabránění zoomu na iOS */
    }
    
    .foxentry-promo img {
        max-width: 100%;
        height: auto;
    }
}

/* Darkmode podpora */
@media (prefers-color-scheme: dark) {
    .foxentry-validator {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .foxentry-validator:focus {
        border-color: #63b3ed;
        box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1);
    }
    
    .foxentry-validator.valid {
        background-color: #1a2e1a;
        border-color: #38a169;
    }
    
    .foxentry-validator.invalid {
        background-color: #2a1a1a;
        border-color: #e53e3e;
    }
    
    .foxentry-result.valid {
        color: #68d391;
    }
    
    .foxentry-result.invalid {
        color: #fc8181;
    }
}

/* ===== ADMIN STRÁNKA - VIZUÁLNÍ PRŮVODCE ===== */

/* Hlavní kontejner průvodce */
.foxentry-api-guide {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: white;
}

.guide-header {
    text-align: center;
    margin-bottom: 40px;
}

.guide-header h2 {
    color: white;
    font-size: 28px;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.guide-header p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* Kroky průvodce */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.guide-step {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guide-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.guide-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* Kritický krok - zvýraznění */
.guide-step.critical-step {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: 2px solid #ff4757;
}

.critical-step::before {
    background: linear-gradient(90deg, #ff4757, #ff6b6b);
    height: 6px;
}

/* Finální krok */
.guide-step.final-step {
    background: linear-gradient(135deg, #2ed573, #1e90ff);
    color: white;
}

.final-step::before {
    background: linear-gradient(90deg, #1e90ff, #2ed573);
    height: 6px;
}

/* Číslo kroku */
.step-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.critical-step .step-number {
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    animation: pulse 2s infinite;
}

.final-step .step-number {
    background: linear-gradient(135deg, #1e90ff, #2ed573);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Obsah kroku */
.step-content {
    flex: 1;
    color: #333;
}

.critical-step .step-content,
.final-step .step-content {
    color: white;
}

.step-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.step-content p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    font-size: 15px;
}

/* Tlačítka v průvodci */
.guide-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.guide-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

/* Obrázky v krocích */
.step-image {
    margin: 15px 0;
    text-align: center;
    width: 33%;
    flex-shrink: 0;
}

.step-image img {
    width: 33%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s ease;
    object-fit: cover;
}

.step-image img:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.image-caption {
    margin-top: 10px;
    font-style: italic;
    font-size: 14px;
    opacity: 0.8;
}

/* Příklad API klíče */
.api-key-example {
    background: rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #2ed573;
}

.api-key-example code {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #fff;
    display: inline-block;
    margin-top: 8px;
}

/* Footer průvodce */
.guide-footer {
    margin-top: 30px;
    text-align: center;
}

.success-tip {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.success-tip h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2ed573;
}

.success-tip p {
    margin: 0;
    font-size: 15px;
    opacity: 0.9;
}

/* Responsivní design pro průvodce */
@media (max-width: 768px) {
    .foxentry-api-guide {
        padding: 20px;
        margin: 15px 0;
    }
    
    .guide-header h2 {
        font-size: 24px;
    }
    
    .guide-step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .step-number {
        align-self: center;
    }
    
    .step-image img {
        max-width: 90%;
    }
}

/* Animace pro lepší UX */
.guide-step {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation pro kroky */
.guide-step:nth-child(1) { animation-delay: 0.1s; }
.guide-step:nth-child(2) { animation-delay: 0.2s; }
.guide-step:nth-child(3) { animation-delay: 0.3s; }
.guide-step:nth-child(4) { animation-delay: 0.4s; }
.guide-step:nth-child(5) { animation-delay: 0.5s; }
.guide-step:nth-child(6) { animation-delay: 0.6s; }
.guide-step:nth-child(7) { animation-delay: 0.7s; }

/* ===== INTERAKTIVNÍ PRVKY ===== */

/* Ovládací prvky průvodce */
.guide-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.guide-toggle-btn,
.guide-reset-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-toggle-btn:hover,
.guide-reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.guide-toggle-btn:hover .toggle-icon {
    transform: scale(1.2);
}

/* Hover efekty pro kroky */
.guide-step.hover-effect {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Animované kroky */
.guide-step.animated {
    animation: slideInUp 0.6s ease-out;
}

/* Smooth scroll indikátor */
.guide-step {
    cursor: pointer;
    position: relative;
}

.guide-step::after {
    content: '👆 Klikněte pro scroll';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.guide-step:hover::after {
    opacity: 1;
}

/* Loading stav pro obrázky */
.step-image img {
    transition: opacity 0.3s ease;
}

.step-image img[src=""] {
    opacity: 0;
}

/* Kritický krok - speciální animace */
.critical-step {
    position: relative;
    overflow: hidden;
}

.critical-step::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Finální krok - speciální efekty */
.final-step {
    position: relative;
}

.final-step .step-number {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Responzivní úpravy pro ovládací prvky */
@media (max-width: 768px) {
    .guide-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .guide-toggle-btn,
    .guide-reset-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .guide-step::after {
        display: none;
    }
}

/* ===== SKENER FORMULÁŘŮ ===== */

.foxentry-form-scanner {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.foxentry-form-scanner h2 {
    color: #495057;
    margin-top: 0;
    font-size: 24px;
}

.scanner-controls {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.scanner-controls .button {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.scanner-controls .button-primary {
    background: linear-gradient(135deg, #007cba, #005a87);
    border-color: #007cba;
}

.scanner-controls .button-primary:hover {
    background: linear-gradient(135deg, #005a87, #004466);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

#scan-results {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#scan-results h3 {
    margin-top: 0;
    color: #495057;
}

.form-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.form-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.form-item h4 {
    margin: 0 0 10px 0;
    color: #007cba;
    font-size: 18px;
}

.form-item p {
    margin: 5px 0;
    color: #6c757d;
}

.form-item ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.form-item li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.form-item li:last-child {
    border-bottom: none;
}

.form-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
}

.form-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.form-item .apply-validation {
    margin-top: 15px;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-item .apply-validation:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Loading stav pro skener */
.scanner-controls .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Animace pro výsledky */
#scan-results {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responzivní úpravy pro skener */
@media (max-width: 768px) {
    .scanner-controls {
        flex-direction: column;
    }
    
    .scanner-controls .button {
        width: 100%;
        text-align: center;
    }
    
    .form-item {
        padding: 15px;
    }
}

/* Našeptávání (Autocomplete) styly */
.foxentry-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.foxentry-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.foxentry-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.foxentry-suggestion-item:hover {
    background-color: #f8f9fa;
}

.foxentry-suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-text {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.suggestion-description {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Dark mode pro našeptávání */
@media (prefers-color-scheme: dark) {
    .foxentry-suggestions {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .foxentry-suggestion-item {
        border-bottom-color: #4a5568;
    }
    
    .foxentry-suggestion-item:hover {
        background-color: #4a5568;
    }
    
    .suggestion-text {
        color: #e2e8f0;
    }
    
    .suggestion-description {
        color: #a0aec0;
    }
}

/* Responzivní design pro našeptávání */
@media (max-width: 768px) {
    .foxentry-suggestions {
        max-height: 200px;
    }
    
    .foxentry-suggestion-item {
        padding: 10px 12px;
    }
    
    .suggestion-text {
        font-size: 13px;
    }
    
    .suggestion-description {
        font-size: 11px;
    }
}
