/* Font family for the entire document */
body {
    font-family: 'Inter', sans-serif;
}

/* Styles for order rating modal */
.order-rating-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
}

.order-rating-modal.hidden {
    display: none;
}

.order-rating-modal-content {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 24rem;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fade-in-up 0.4s ease-out forwards;
}

.order-rating-icon-container {
    position: relative;
    width: 7rem;
    height: 7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.order-rating-decoration-dot {
    position: absolute;
    background: #fbbf24;
    border-radius: 50%;
    opacity: 0.7;
}

.dot-top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    margin-top: -0.5rem;
    width: 0.75rem;
    height: 0.75rem;
}

.dot-bottom {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
}

.dot-top-left {
    top: 25%;
    left: -0.5rem;
    width: 0.75rem;
    height: 0.75rem;
}

.dot-top-right {
    top: 25%;
    right: -0.5rem;
    width: 0.75rem;
    height: 0.75rem;
}

.dot-bottom-left-small {
    bottom: 25%;
    left: -0.25rem;
    width: 0.5rem;
    height: 0.5rem;
}

.dot-bottom-right-small {
    bottom: 25%;
    right: -0.25rem;
    width: 0.5rem;
    height: 0.5rem;
}

.order-rating-icon-circle {
    width: 6rem;
    height: 6rem;
    background: #fbbf24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.order-rating-icon-svg {
    width: 3rem;
    height: 3rem;
    color: #1f2937;
}

.order-rating-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.order-rating-subtitle {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.order-rating-info {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 1rem;
}

.order-rating-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Стили для звезд рейтинга */
.order-rating-star {
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
}

.order-rating-star:hover {
    transform: scale(1.1);
}

.order-rating-star svg {
    width: 100%;
    height: 100%;
    fill: #d1d5db;
    transition: fill 0.2s ease, transform 0.2s ease;
}

.order-rating-star.active svg {
    fill: #fbbf24;
}

.order-rating-star:hover svg {
    fill: #fbbf24;
}

/* Стили для альтернативного набора звезд (span элементы) */
#orderRatingStars .star {
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #d1d5db;
    opacity: 0.5;
    display: inline-block;
    line-height: 1;
}

#orderRatingStars .star.active {
    color: #fbbf24;
    opacity: 1;
}

#orderRatingStars .star:hover {
    color: #fbbf24;
    opacity: 1;
    transform: scale(1.2);
}

.order-rating-textarea {
    width: 100%;
    height: 7rem;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: none;
    font-family: inherit;
}

.order-rating-textarea:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
}

.order-rating-char-counter {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: right;
    width: 100%;
}

.order-rating-submit-btn {
    width: 100%;
    background: #fbbf24;
    color: #1f2937;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.order-rating-submit-btn:hover {
    background: #f59e0b;
    transform: scale(1.05);
}

.order-rating-skip-btn {
    width: 100%;
    background: none;
    color: #6b7280;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.order-rating-skip-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Скрытие кнопки пропуска при отсутствии рейтинга */
.order-rating-skip-btn.hidden {
    display: none !important;
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(1rem);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar styles for textarea */
textarea::-webkit-scrollbar {
    width: 6px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

textarea::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Animation for modal appearance */
.animate-fade-in-up {
    animation: fade-in-up 0.4s ease-out forwards;
}

/* Styles for address display */
.location-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.location-icon {
    color: #007bff;
    flex-shrink: 0;
}

.location-text {
    flex: 1;
    min-width: 0;
}

.location-address {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-coordinates {
    display: block;
    font-size: 12px;
    color: #666;
    font-family: 'Courier New', monospace;
}

.location-actions {
    flex-shrink: 0;
}

.location-edit-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.location-edit-btn:hover {
    background: #e9ecef;
    color: #333;
}

/* Styles for address balloon */
.address-balloon {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 280px;
}

.address-balloon-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.address-balloon-short {
    font-size: 14px;
    color: #007bff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.address-balloon-full {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.3;
}

.address-balloon-coords {
    font-size: 11px;
    color: #999;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
}

.address-balloon-actions {
    text-align: center;
}

.address-balloon-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.address-balloon-btn:hover {
    background: #0056b3;
}

.address-balloon-confirm {
    background: #28a745;
}

.address-balloon-confirm:hover {
    background: #218838;
}

/* Styles for address edit popup */
#addressEditPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.address-edit-popup {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.popup-header {
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.popup-header h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.close-popup-x {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
}

.popup-body {
    padding: 0 20px 20px 20px;
}

.address-input-container {
    margin-bottom: 20px;
}

.address-input-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.autocomplete-suggestions {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    display: none;
}

.address-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    transition: background-color 0.2s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Styles for rating modal (legacy) */
#orderRatingModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

#orderRatingModal.hidden {
    display: none;
}

.rating-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.rating-input-group {
    margin: 20px 0;
}

.rating-input-group textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.rating-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.rating-buttons button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Styles for temporary messages in chat */
.temp-message {
    opacity: 0.7;
}

.temp-message .sending-indicator {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
}

#appBottomNav.d-none {
    display: none !important;
}
