.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 380px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out;
    box-sizing: border-box;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #232323;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #232323;
}

.modal-form {
    padding: 15px;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 12px;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #333;
    font-size: 0.85rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-family: 'Figtree', sans-serif;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #232323;
    box-shadow: 0 0 0 2px rgba(35, 35, 35, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    box-sizing: border-box;
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: #232323;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Figtree', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.submit-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.submit-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.submit-btn:hover svg {
    transform: translateX(3px);
}

/* Animace pro vstup a výstup modalu */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Responzivní design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 15px;
    }

    .modal-header {
        padding: 10px 12px;
    }

    .modal-form {
        padding: 12px;
    }

    .submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Form input animations */
.modal-form-group {
    transition: transform 0.3s ease;
}

.modal-form-group:focus-within {
    transform: translateY(-5px);
}

/* Error handling styles */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    border-left: 4px solid #c62828;
    font-size: 14px;
    animation: slideInDown 0.3s ease-out;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    border-left: 4px solid #2e7d32;
    font-size: 14px;
    animation: slideInDown 0.3s ease-out;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.1);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.submit-btn:disabled:hover {
    background: #232323;
    transform: none !important;
    box-shadow: none !important;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
} 