/* ===== Header layout: Bootstrap grid col-2 | col-8 | col-2 ===== */
.nav_menu {
    display: flex;
    align-items: center;
}
.nav.toggle {
    float: none;
    flex-shrink: 0;
}
.nav_menu .text-center h3 {
    margin: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav_menu .text-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ===== Assistenza button ===== */
#p4a_ticket_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(52,152,219,0.3);
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1;
}
#p4a_ticket_btn:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    box-shadow: 0 4px 14px rgba(52,152,219,0.45);
    transform: translateY(-1px);
}
#p4a_ticket_btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(52,152,219,0.3);
}
.p4a-ticket-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    font-size: 12px;
}
.p4a-ticket-btn-label {
    font-size: 13px;
}
@media (max-width: 991px) {
    .p4a-ticket-btn-label {
        display: none;
    }
    #p4a_ticket_btn {
        padding: 7px;
    }
}

/* ===== Ticket Modal Overlay ===== */
.p4a-ticket-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: p4aTicketFadeIn 0.2s ease;
}
@keyframes p4aTicketFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Ticket Dialog ===== */
.p4a-ticket-dialog {
    background: #fff;
    border-radius: 12px;
    width: 480px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: p4aTicketSlideIn 0.25s ease;
}
@keyframes p4aTicketSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== Ticket Header ===== */
.p4a-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}
.p4a-ticket-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.p4a-ticket-header h3 i {
    color: #3498db;
    margin-right: 6px;
}
.p4a-ticket-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
.p4a-ticket-close:hover {
    color: #333;
}

/* ===== Ticket Body ===== */
.p4a-ticket-body {
    padding: 20px;
}
.p4a-ticket-field {
    margin-bottom: 16px;
}
.p4a-ticket-field:last-child {
    margin-bottom: 0;
}
.p4a-ticket-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}
.p4a-ticket-required {
    color: #e74c3c;
}
.p4a-ticket-field select,
.p4a-ticket-field input[type="text"],
.p4a-ticket-field textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.p4a-ticket-field select:focus,
.p4a-ticket-field input[type="text"]:focus,
.p4a-ticket-field textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}
.p4a-ticket-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* ===== Ticket Footer ===== */
.p4a-ticket-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e8e8e8;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}
.p4a-ticket-btn-cancel {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.p4a-ticket-btn-cancel:hover {
    background: #f0f0f0;
    border-color: #bbb;
}
.p4a-ticket-btn-submit {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.p4a-ticket-btn-submit:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
}
.p4a-ticket-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.p4a-ticket-btn-submit i {
    margin-right: 4px;
}

/* ===== Ticket Result Messages ===== */
.p4a-ticket-result {
    margin: 0 20px 16px 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}
.p4a-ticket-result-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.p4a-ticket-result-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.p4a-ticket-link {
    color: #155724;
    font-weight: 600;
    text-decoration: underline;
}
.p4a-ticket-link:hover {
    color: #0d3620;
}
