/* profile.css - ملف التنسيقات الجديدة */

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: var(--radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInRight 0.3s ease;
    border-right: 4px solid var(--success);
    pointer-events: auto;
    max-width: 500px;
    margin-right: auto;
}

.toast.error {
    border-right-color: var(--danger);
}

.toast.warning {
    border-right-color: var(--warning);
}

.toast.info {
    border-right-color: var(--primary);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--primary); }

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark);
}

.toast-message {
    color: var(--gray);
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 5px;
    flex-shrink: 0;
    font-size: 1.2rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* أزرار البروفايل في الهيدر */
.profile-buttons {
    display: flex;
    gap: 10px;
}

.profile-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    min-height: 44px;
}

.view-profile-btn {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.update-profile-btn {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.view-profile-btn:hover {
    background: rgba(16, 185, 129, 0.2);
}

.update-profile-btn:hover {
    background: rgba(37, 99, 235, 0.2);
}

/* زر العائم للهواتف */
.floating-update-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 100;
    transition: var(--transition);
    display: none;
}

.floating-update-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
}

.floating-update-btn i {
    font-size: 1.5rem;
}

.floating-update-btn span {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    padding: 20px;
}

.modal {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    animation: scaleIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2rem;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 20px 25px;
    background: var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #E5E7EB;
}

/* Profile Info Display */
.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    margin-bottom: 15px;
}

.info-label {
    display: block;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-value {
    display: block;
    padding: 10px 15px;
    background: var(--light-gray);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--dark);
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Update Profile Form */
.update-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
    border: 1px solid #D1D5DB;
}

.btn-secondary:hover {
    background: #E5E7EB;
}

/* Complete Trip Button Styles */
.complete-trip-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    min-height: 44px;
}

.complete-trip-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.complete-trip-btn.incomplete {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.complete-trip-btn.incomplete:hover {
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .profile-buttons {
        display: none;
    }
    
    .floating-update-btn {
        display: flex;
    }
    
    .modal {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .profile-buttons {
        display: flex;
        width: 100%;
        justify-content: center;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .profile-info,
    .update-form {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .toast {
        max-width: 100%;
        padding: 14px 16px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 15px 20px;
    }
    
    .floating-update-btn {
        width: 55px;
        height: 55px;
        bottom: 15px;
        left: 15px;
    }
}