/* Event Creation Modal Styles */

.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.event-modal-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.event-modal-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.event-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.event-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.modal-steps {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.step {
    display: flex;
    align-items: center;
    margin: 0 15px;
    color: #bdc3c7;
    font-size: 14px;
    position: relative;
}

.step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 30px;
    height: 2px;
    background: #bdc3c7;
    transform: translateY(-50%);
}

.step:last-child::after {
    display: none;
}

.step.active {
    color: #3498db;
}

.step.active::after {
    background: #3498db;
}

.step.completed {
    color: #27ae60;
}

.step.completed::after {
    background: #27ae60;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: currentColor;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
}

.step-label {
    font-weight: 600;
}

.step-content {
    padding: 30px;
    min-height: 400px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

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

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.form-group input.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.field-help {
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

.modal-error {
    background: #fdf2f2;
    color: #e74c3c;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #e74c3c;
    display: none;
}

/* Event Type Selection */
.event-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.event-type-option {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    background: white;
}

.event-type-option:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.event-type-option.selected {
    border-color: #3498db;
    background: #e8f4f8;
    color: #2980b9;
}

.type-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 5px;
}

.type-label {
    font-size: 12px;
    font-weight: 600;
}

/* Importance Slider */
.importance-slider-container {
    margin: 10px 0;
}

.importance-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ecf0f1;
    outline: none;
    margin: 10px 0;
}

.importance-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.importance-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.importance-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #7f8c8d;
}

#importanceValue {
    color: #3498db;
    font-weight: bold;
}

/* Time Selection */
.time-selection {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.time-display {
    margin: 15px 0;
    text-align: center;
}

.time-preview {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    border: 2px solid #3498db;
    color: #2980b9;
    font-weight: bold;
    display: inline-block;
}

.duration-toggle {
    margin: 15px 0;
}

.duration-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.end-time-section {
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-top: 15px;
}

.time-helpers {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.helper-btn {
    padding: 8px 12px;
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.helper-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Location Selection */
.location-selection {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.coordinates-section {
    margin-top: 15px;
}

.location-helpers {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.location-picker-map {
    margin-top: 15px;
    border: 2px solid #3498db;
    border-radius: 8px;
    overflow: hidden;
}

.map-container {
    position: relative;
}

.map-instructions {
    background: #3498db;
    color: white;
    padding: 8px 15px;
    text-align: center;
    font-size: 12px;
}

/* Participants and Related Events */
.participants-input,
.related-events-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.participants-input input,
.related-events-input input {
    flex: 1;
}

.add-btn,
.search-btn {
    padding: 10px 15px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.add-btn:hover,
.search-btn:hover {
    background: #229954;
}

.participants-list,
.related-events-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.participant-tag,
.related-event-tag {
    background: #e8f4f8;
    color: #2980b9;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.remove-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.remove-btn:hover {
    background: #e74c3c;
    color: white;
}

.related-event-result {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-info strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 2px;
}

.event-info small {
    color: #7f8c8d;
}

.add-relation-btn {
    padding: 5px 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.add-relation-btn:hover {
    background: #2980b9;
}

.related-events-selected {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

/* Modal Footer */
.event-modal-footer {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 15px 15px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

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

.btn-cancel:hover {
    background: #c0392b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-modal-overlay {
        padding: 10px;
    }

    .event-modal-container {
        max-height: 95vh;
    }

    .event-modal-header {
        padding: 15px;
    }

    .event-modal-header h2 {
        font-size: 1.3em;
    }

    .step-content {
        padding: 20px;
        min-height: 300px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .event-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .type-icon {
        font-size: 16px;
    }

    .type-label {
        font-size: 11px;
    }

    .modal-steps {
        padding: 15px 10px;
    }

    .step {
        margin: 0 8px;
        font-size: 12px;
    }

    .step::after {
        width: 15px;
    }

    .step-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
        margin-right: 5px;
    }

    .time-helpers,
    .location-helpers {
        flex-direction: column;
    }

    .helper-btn {
        text-align: center;
    }

    .participants-input,
    .related-events-input {
        flex-direction: column;
    }

    .modal-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .event-modal-container {
        border-radius: 10px;
    }

    .event-modal-header {
        border-radius: 10px 10px 0 0;
    }

    .event-modal-footer {
        border-radius: 0 0 10px 10px;
    }

    .step-content {
        padding: 15px;
    }

    .event-type-grid {
        grid-template-columns: 1fr;
    }

    .participants-list,
    .related-events-list {
        justify-content: center;
    }
}

/* Custom checkbox styles */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3498db;
}

/* Scrollbar styles for modal body */
.event-modal-body::-webkit-scrollbar {
    width: 6px;
}

.event-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.event-modal-body::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.event-modal-body::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}