/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    margin: 2% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    border: 10px solid transparent;
    border-left: 0;
    box-sizing: border-box;
}

/* Apply custom scrollbar to sidebar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a42a0);
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #667eea;
}

/* Form styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Fix dropdown arrow spacing for form fields */
#placeCategory, #placeRating {
    padding-right: 30px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Photo upload styling */
.photo-upload-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.photo-upload-container input[type="file"] {
    flex: 1;
}

.photo-upload-container span {
    color: #666;
    font-weight: normal;
    white-space: nowrap;
}

.photo-upload-container input[type="url"] {
    flex: 1;
}

.photo-upload-help {
    color: #666;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Photo preview styling */
#photoPreview {
    margin-top: 10px;
    display: none;
    text-align: center;
}

#previewImage {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    aspect-ratio: 16/9;
    border: 2px solid #e0e0e0;
}

/* Submit button styling */
.submit-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit-btn i {
    font-size: 14px;
}

/* Loading state for submit button */
.submit-btn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Form validation styling */
.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: #ff4757;
}

.form-group input:valid,
.form-group select:valid,
.form-group textarea:valid {
    border-color: #2ed573;
}

/* Error message styling */
.error-message {
    color: #ff4757;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ff4757;
}

/* Success message styling */
.success-message {
    background: #2ed573;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.success-message.show {
    display: block;
}
