.itinerary-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px; /* adjust as needed */
}

.edit-itinerary-icon {
    font-size: 16px;
    margin-bottom: 4px;
    color: #0056b3;
    cursor: pointer;
}

.editable-itinerary {
    font-size: 12px;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
}

.table-edit-container {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: middle;
    white-space: nowrap;
}

.table-edit-input {
    width: 140px;
    height: 26px;
    padding: 2px 6px;
    font-size: 12px;
    border: 1px solid #007bff;
    border-radius: 3px;
    outline: none;
    background: #fff;
}

.table-edit-input:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.25);
}

.table-edit-btn {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}

.table-edit-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.table-edit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.save-btn {
    background-color: #28a745;
    color: white;
}

.save-btn:hover:not(:disabled) {
    background-color: #218838;
}

.cancel-btn {
    background-color: #dc3545;
    color: white;
}

.cancel-btn:hover:not(:disabled) {
    background-color: #c82333;
}

/* تحسينات للجداول */
.table td {
    vertical-align: middle;
    position: relative;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .editable-itinerary {
        max-width: 100px;
        font-size: 11px;
    }

    .edit-itinerary-icon {
        opacity: 1;
        font-size: 11px;
        margin-left: 4px;
    }
    
    .table-edit-input {
        width: 100px;
        height: 28px;
        font-size: 11px;
    }
    
    .table-edit-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
}

/* Animation للظهور */
.table-edit-container {
    animation: slideIn 0.15s ease-out;
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .table-edit-input {
        background-color: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .table-edit-input:focus {
        border-color: #63b3ed;
    }
}