/**
 * TehBeton Calculator CSS
 */

/* Floating button styles */
.tehbeton-floating-btn {
    position: fixed;
    bottom: 30px;
    z-index: 99999;
    animation: tehbeton-float-btn 1s ease;
}

.tehbeton-position-left {
    left: 30px;
}

.tehbeton-position-right {
    right: 30px;
}

.tehbeton-position-center {
    left: 50%;
    transform: translateX(-50%);
}

@keyframes tehbeton-float-btn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tehbeton-open-btn {
    background: var(--tehbeton-button-color, #ff6f00);
    color: #fff !important;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.tehbeton-open-btn:hover {
    background: var(--tehbeton-button-hover-color, #e65c00);
    transform: scale(1.05);
    text-decoration: none;
}

.tehbeton-open-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

/* Modal styles */
.tehbeton-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999999;
    overflow-y: auto;
}

.tehbeton-modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 25px;
    width: 95%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.tehbeton-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.tehbeton-close:hover {
    color: #333;
}

/* Form styles */
.tehbeton-input-group {
    margin-bottom: 15px;
}

.tehbeton-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.tehbeton-input {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s;
}

.tehbeton-input:focus {
    border-color: var(--tehbeton-button-color, #ff6f00);
    outline: none;
}

/* Контейнер для полів адреси */
.tehbeton-address-container {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.tehbeton-address-field {
    flex: 1;
}

.tehbeton-city-input {
    width: 100%;
}

.tehbeton-street-input {
    width: 100%;
}

/* Кнопка розрахунку відстані */
.tehbeton-address-btn {
    display: inline-block;
    padding: 8px 12px;
    background-color: var(--tehbeton-button-color, #ff6f00);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    width: auto;
}

.tehbeton-address-btn:hover {
    background-color: var(--tehbeton-button-hover-color, #e65c00);
}

.tehbeton-address-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* Опис під полем введення */
.tehbeton-input-description {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.tehbeton-input-description.success {
    color: #137333;
}

.tehbeton-input-description.error {
    color: #c5221f;
}

/* Стилі для автозаповнення Google Maps */
.pac-container {
    z-index: 1000000 !important;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-top: 5px;
    padding: 5px 0;
    background: #fff;
}

.pac-item {
    padding: 8px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.pac-item:hover {
    background: #f5f5f5;
}

.pac-item-query {
    font-weight: 500;
}

.pac-matched {
    font-weight: bold;
}

/* Step styles */
.tehbeton-step {
    display: none;
}

.tehbeton-step.active {
    display: block;
}

.tehbeton-step h2 {
    margin-top: 0;
    color: #333;
    margin-bottom: 20px;
}

#result {
    white-space: pre-line;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    line-height: 1.5;
}

#result hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 10px 0;
}

#result p {
    margin: 8px 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .tehbeton-floating-btn {
        bottom: 20px;
    }
    
    .tehbeton-position-left,
    .tehbeton-position-right {
        left: 10px;
        right: 10px;
        text-align: center;
    }
    
    .tehbeton-position-center {
        left: 10px;
        right: 10px;
        transform: none;
        text-align: center;
    }
    
    .tehbeton-open-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .tehbeton-modal-content {
        margin: 10% auto;
        padding: 15px;
    }
}

/* Admin-specific styles */
.tehbeton-admin-cards {
    display: flex;
    flex-wrap: wrap;
    margin: 20px 0;
    gap: 20px;
}

.tehbeton-admin-card {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 250px;
}

.tehbeton-status {
    margin: 15px 0;
}

.tehbeton-status-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.tehbeton-status-label {
    font-weight: 500;
    margin-right: 10px;
}

.tehbeton-status-value {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 13px;
}

.tehbeton-status-value.connected {
    background: #e6f4ea;
    color: #137333;
}

.tehbeton-status-value.not-connected {
    background: #fce8e6;
    color: #c5221f;
}

.tehbeton-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Shortcode display */
.tehbeton-inline {
    margin-top: 30px;
    margin-bottom: 30px;
}

.tehbeton-inline .tehbeton-modal-content {
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tehbeton-inline .tehbeton-close {
    display: none;
}
