/* Modal Components Styles */
/* Ubicación: resources/css/components/modals.css */

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block !important;
}

#new-trip-modal {
    background-color: rgba(0, 0, 0, 0.7);
}

#new-trip-modal .modal-content {
    max-width: 500px;
    margin: 10% auto;
}

/* New Trip Modal Specific Styles */
.new-trip-modal {
    max-width: 450px;
    margin: 15% auto;
}

.new-trip-modal .modal-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 2rem 1rem 2rem;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #495057;
}

.modal-title i {
    color: #007bff;
    font-size: 1.2rem;
}

.new-trip-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.new-trip-modal .modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.new-trip-modal .modal-body {
    padding: 2rem;
    text-align: center;
}

.welcome-section {
    margin-bottom: 2rem;
}

.airplane-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #007bff;
}

.welcome-section h2 {
    color: #495057;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-section p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

.input-section {
    text-align: left;
}

.input-section label {
    display: block;
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.trip-name-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.trip-name-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.trip-name-input::placeholder {
    color: #adb5bd;
}

.new-trip-modal .modal-footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-create {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-create:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-create i {
    font-size: 0.8rem;
}

/* Force modal to be visible when it has the show class */
#new-trip-modal.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h3 {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8f9fa;
}

/* Unsaved Changes Modal */
.changes-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.changes-summary h5 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-dark);
}

#changesSummary {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Element Type Selection */
.element-type-selection {
    padding: 1rem 0;
}

.element-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.element-type-btn {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.element-type-btn:hover {
    border-color: #007bff;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.element-type-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.element-type-btn span {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .element-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}