/**
 * WebFusion Nabídka Generator - Styles
 */

/* ============================================
   Společné styly pro oba buttony
   ============================================ */
.wfng-generate-pdf-btn,
.wfng-send-email-btn {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 12px 32px;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #F30000;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: "KOMETA", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

.wfng-generate-pdf-btn .wfng-btn-icon,
.wfng-send-email-btn .wfng-btn-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.wfng-generate-pdf-btn span,
.wfng-send-email-btn span {
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.wfng-generate-pdf-btn:hover,
.wfng-send-email-btn:hover {
    background-color: #ffffff;
    border-color: #F30000;
}

.wfng-generate-pdf-btn:hover span,
.wfng-send-email-btn:hover span {
    text-decoration: underline;
    text-decoration-color: #F30000;
    text-underline-offset: 3px;
}

.wfng-generate-pdf-btn:active,
.wfng-send-email-btn:active {
    background-color: #FDE8E8;
}

.wfng-generate-pdf-btn:disabled,
.wfng-send-email-btn:disabled {
    background-color: #f5f5f5;
    border-color: #cccccc;
    color: #999999;
    cursor: not-allowed;
}

.wfng-generate-pdf-btn.loading,
.wfng-send-email-btn.loading {
    position: relative;
    color: transparent;
}

.wfng-generate-pdf-btn.loading .wfng-btn-icon,
.wfng-send-email-btn.loading .wfng-btn-icon {
    opacity: 0;
}

.wfng-generate-pdf-btn.loading::after,
.wfng-send-email-btn.loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid #F30000;
    border-radius: 50%;
    border-top-color: transparent;
    animation: wfng-spinner 0.6s linear infinite;
}

@keyframes wfng-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Notifikace */
.wfng-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: wfng-slide-in 0.3s ease;
}

.wfng-notification.success {
    border-left: 4px solid #06d6a0;
}

.wfng-notification.error {
    border-left: 4px solid #e63946;
}

@keyframes wfng-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   Email Modal
   ============================================ */
.wfng-email-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.wfng-email-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wfng-email-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    animation: wfng-fade-in 0.3s ease;
}

.wfng-email-modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 0;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    border: 1px solid #F30000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: wfng-modal-in 0.3s ease;
}

.wfng-email-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666666;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.wfng-email-modal-close:hover {
    color: #F30000;
}

.wfng-email-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.wfng-modal-icon {
    margin-bottom: 16px;
}

.wfng-modal-icon svg {
    width: 48px;
    height: 48px;
}

.wfng-email-modal-header h3 {
    margin: 0;
    color: #000000;
    font-size: 22px;
    font-weight: 600;
}

.wfng-modal-machine-info {
    text-align: center;
    padding: 16px 20px;
    background-color: #FEE8DB;
    margin-bottom: 20px;
}

.wfng-modal-machine-info .wfng-machine-detail {
    margin: 8px 0;
    color: #000000;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.wfng-modal-machine-info .wfng-machine-detail:first-child {
    margin-top: 0;
}

.wfng-modal-machine-info .wfng-machine-detail:last-child {
    margin-bottom: 0;
}

.wfng-modal-machine-info .wfng-machine-detail strong {
    font-weight: 700;
    color: #F30000;
}

.wfng-modal-description {
    margin: 0 0 24px 0;
    text-align: center;
    color: #555555;
    font-size: 14px;
    line-height: 1.5;
}

.wfng-form-group {
    margin-bottom: 20px;
}

.wfng-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
}

.wfng-form-group input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cccccc;
    border-radius: 0;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.wfng-form-group input[type="email"]:focus {
    outline: none;
    border-color: #F30000;
    box-shadow: 0 0 0 2px rgba(243, 0, 0, 0.1);
}

.wfng-form-group input[type="email"]::placeholder {
    color: #999999;
}

.wfng-email-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background-color: #F30000;
    color: #ffffff;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wfng-email-submit-btn:hover {
    background-color: #d50000;
}

.wfng-email-submit-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.wfng-email-submit-btn .wfng-btn-loading {
    display: none;
}

.wfng-email-submit-btn.loading .wfng-btn-text {
    display: none;
}

.wfng-email-submit-btn.loading .wfng-btn-loading {
    display: inline;
}

.wfng-email-modal-note {
    margin: 16px 0 0 0;
    text-align: center;
    color: #888888;
    font-size: 12px;
}

/* ============================================
   Modal Success State
   ============================================ */
.wfng-modal-success-wrapper {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.wfng-email-modal.success .wfng-email-modal-content {
    background-color: #F30000;
    border-color: #F30000;
    animation: wfng-success-pulse 0.4s ease;
}

.wfng-email-modal.success .wfng-email-modal-close {
    color: rgba(255, 255, 255, 0.7);
}

.wfng-email-modal.success .wfng-email-modal-close:hover {
    color: #ffffff;
}

.wfng-success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px auto;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wfng-checkmark-pop 0.5s ease 0.1s both;
}

.wfng-success-checkmark svg {
    width: 40px;
    height: 40px;
    stroke: #ffffff;
    stroke-width: 3;
    fill: none;
}

.wfng-success-checkmark svg path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: wfng-checkmark-draw 0.4s ease 0.3s forwards;
}

.wfng-success-title {
    margin: 0 0 8px 0;
    color: #ffffff!important;
    font-size: 24px;
    font-weight: 600;
}

.wfng-success-message {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.wfng-success-email {
    font-weight: 600;
    color: #ffffff;
}

@keyframes wfng-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes wfng-success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes wfng-checkmark-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes wfng-checkmark-draw {
    to { stroke-dashoffset: 0; }
}
