/**
 * Location Popup Styles
 */

.wploc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.wploc-popup-overlay.wploc-active {
    display: flex;
}

.wploc-popup-container {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: wploc-popup-slide-in 0.3s ease-out;
}

@keyframes wploc-popup-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wploc-popup-content {
    padding: 30px;
}

.wploc-popup-logo {
    text-align: center;
    margin-bottom: 20px;
}

.wploc-popup-logo img {
    max-width: 200px;
    height: auto;
}

.wploc-popup-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 10px;
    color: var(--wploc-text, #2c3e50);
}

.wploc-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin: 0 0 25px;
    font-size: 14px;
}

/* Steps */
.wploc-step {
    display: none;
}

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

/* Mode Selection */
.wploc-mode-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.wploc-mode-btn {
    background: var(--wploc-secondary, #ecf0f1);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--wploc-text, #2c3e50);
}

.wploc-mode-btn:hover {
    border-color: var(--wploc-primary, #e74c3c);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wploc-mode-btn .wploc-icon {
    display: block;
    font-size: 40px;
    margin-bottom: 10px;
}

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

.wploc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--wploc-text, #2c3e50);
}

.wploc-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    background: #fff;
}

.wploc-select:focus {
    outline: none;
    border-color: var(--wploc-primary, #e74c3c);
}

.wploc-select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Buttons */
.wploc-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wploc-btn-primary {
    background: var(--wploc-primary, #e74c3c);
    color: #fff;
}

.wploc-btn-primary:hover:not(:disabled) {
    background: var(--wploc-primary, #c0392b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.wploc-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wploc-btn-secondary {
    background: var(--wploc-secondary, #ecf0f1);
    color: var(--wploc-text, #2c3e50);
    padding: 10px 20px;
    width: auto;
}

.wploc-btn-secondary:hover {
    background: #d5dbdb;
}

.wploc-back-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    margin-bottom: 15px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.wploc-back-btn:hover {
    color: var(--wploc-primary, #e74c3c);
}

.wploc-link-btn {
    background: none;
    border: none;
    color: var(--wploc-primary, #e74c3c);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    text-decoration: underline;
}

.wploc-link-btn:hover {
    color: var(--wploc-primary, #c0392b);
}

/* Geolocation */
.wploc-geolocation {
    text-align: center;
    margin-top: 15px;
}

/* Branches List */
.wploc-branches-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

.wploc-branch-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.wploc-branch-item:hover {
    border-color: var(--wploc-primary, #e74c3c);
    background: #fafafa;
}

.wploc-branch-info {
    flex: 1;
}

.wploc-branch-name {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
    color: var(--wploc-text, #2c3e50);
}

.wploc-branch-address {
    margin: 0 0 5px;
    font-size: 13px;
    color: #7f8c8d;
}

.wploc-branch-map {
    font-size: 13px;
    color: var(--wploc-primary, #e74c3c);
    text-decoration: none;
}

.wploc-branch-map:hover {
    text-decoration: underline;
}

.wploc-select-branch {
    margin-left: 15px;
}

/* Loading State */
.wploc-loading {
    text-align: center;
    padding: 40px 20px;
}

.wploc-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--wploc-primary, #e74c3c);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: wploc-spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Error Message */
.wploc-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .wploc-popup-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .wploc-popup-content {
        padding: 20px;
    }

    .wploc-mode-buttons {
        grid-template-columns: 1fr;
    }

    .wploc-branch-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .wploc-select-branch {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
}
