/**
 * Store Check-in Public Styles
 */

/* Store Finder */
.store-checkin-finder {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.finder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.finder-header h2 {
    margin: 0;
    font-size: 24px;
}

.btn-primary {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #005a87;
}

.finder-loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Store Cards */
.finder-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.store-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.store-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.store-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-image-placeholder {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #ccc;
}

.store-info {
    padding: 20px;
}

.store-name {
    margin: 0 0 10px;
    font-size: 20px;
    color: #333;
}

.store-category {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 10px;
}

.store-address {
    color: #666;
    margin: 10px 0;
    font-size: 14px;
}

.store-description {
    color: #555;
    font-size: 14px;
    margin: 10px 0;
}

.store-meta {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.store-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.store-meta .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.btn-checkin {
    width: 100%;
    background: #46b450;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-checkin:hover {
    background: #3a9b42;
}

/* Location Picker Modal (Demo Mode) */
.location-picker-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-large {
    max-width: 900px;
    width: 95%;
}

.modal-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.location-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.location-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 20px;
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.location-option-btn:hover {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.location-icon {
    font-size: 48px;
}

.location-name {
    font-size: 18px;
    font-weight: 600;
}

#location-map {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.selected-location-info {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.selected-location-info p {
    margin: 0 0 15px;
    font-size: 14px;
    color: #333;
}

#selected-coords {
    font-weight: 600;
    color: #0073aa;
}

#confirm-location-btn {
    width: auto;
    padding: 12px 30px;
}

/* Check-in Modal */
.checkin-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #000;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

#modal-store-info h4 {
    margin: 0 0 10px;
    color: #333;
}

#modal-store-info p {
    margin: 0 0 20px;
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

/* Check-in History */
.store-checkin-history {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.store-checkin-history h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.no-checkins {
    text-align: center;
    padding: 40px;
    color: #666;
}

.checkin-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkin-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
}

.checkin-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.checkin-store h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.checkin-meta {
    margin-top: 15px;
}

.checkin-distance {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.checkin-note {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border-left: 3px solid #0073aa;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.checkin-stats {
    margin-top: 30px;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 8px;
    text-align: center;
}

/* Stores List */
.store-checkin-list {
    padding: 20px;
}

.store-checkin-list h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.no-stores {
    text-align: center;
    padding: 40px;
    color: #666;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.store-actions {
    margin-top: 15px;
}

.btn-map {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f5f5f5;
    color: #333;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-map:hover {
    background: #e0e0e0;
}

.store-website {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #0073aa;
    text-decoration: none;
}

.store-website:hover {
    text-decoration: underline;
}

.stores-count {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 20px;
}

/* Messages */
.error-message,
.success-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .finder-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .finder-results,
    .stores-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
    }
}
