/* Styles for the Add Coffee Shop Form */
.coffee-add-form-container {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.coffee-add-form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.add-coffee-shop-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fafafa;
}

.section-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 20px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
}

/* Стили для карты */
.map-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

#coffee-shop-map {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.map-coordinates {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.map-coordinates label {
    color: #6c757d;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-coordinates input {
    background: #fff;
    border: 1px solid #ced4da;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #495057;
}

.map-coordinates input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#find-on-map-btn {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#find-on-map-btn:hover {
    background: linear-gradient(135deg, #005a87, #004a73);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.3);
}

#find-on-map-btn:active {
    transform: translateY(0);
}

/* Чекбоксы особенностей */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.checkbox-item:hover {
    border-color: #0073aa;
    background: #f8f9ff;
}

.checkbox-item.checked {
    background: #e8f4fd;
    border-color: #0073aa;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

/* Кнопки формы */
.form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

.add-coffee-shop-submit {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-coffee-shop-submit:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.button-icon {
    font-size: 18px;
}

/* Превью изображения */
.image-preview-container {
    margin-top: 10px;
}

.image-preview {
    position: relative;
    display: inline-block;
    max-width: 200px;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-image:hover {
    background: #c82333;
}

/* Отзывчивость */
@media (max-width: 768px) {
    .map-coordinates {
        flex-direction: column;
        gap: 10px;
    }
    
    .map-coordinates > div {
        flex: none !important;
    }
    
    #find-on-map-btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* Анимация загрузки */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Сообщения об ошибках и успехе */
.form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.form-success {
    text-align: center;
    padding: 40px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
}

.form-success i {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 20px;
}

.form-error-container {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    color: #721c24;
}

.view-coffee-shop-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-coffee-shop-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Responsive styles */
@media (max-width: 768px) {
    .coffee-add-form-container {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .add-coffee-shop-submit,
    .cancel-button {
        max-width: 100%;
    }
} 