/* Rapidinha Multistore - Frontend Styles */

/* Store Selector - Minimalista */
.rapidinha-store-selector {
    margin: 8px 0;
    padding: 0;
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rapidinha-store-selector label {
    display: inline-block;
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rapidinha-store-select {
    display: inline-block;
    width: auto;
    min-width: 160px;
    max-width: 220px;
    padding: 4px 10px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    color: #333;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rapidinha-store-select:hover {
    border-color: #bbb;
}

.rapidinha-store-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.rapidinha-selected-store-info {
    display: none;
}

/* Store Selector - Cards */
.rapidinha-cards h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.rapidinha-stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.rapidinha-store-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rapidinha-store-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.1);
    transform: translateY(-2px);
}

.rapidinha-store-card.selected {
    border-color: #46b450;
    background: #f0f8f0;
}

.rapidinha-store-card .store-image {
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.rapidinha-store-card .store-image img {
    width: 100%;
    height: auto;
    display: block;
}

.rapidinha-store-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.rapidinha-store-card .store-address,
.rapidinha-store-card .store-phone {
    font-size: 14px;
    color: #666;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rapidinha-store-card .dashicons {
    font-size: 16px;
    color: #0073aa;
}

.rapidinha-select-store-btn {
    width: 100%;
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.rapidinha-select-store-btn:hover {
    background: #005a87;
}

.rapidinha-store-card.selected .rapidinha-select-store-btn {
    background: #46b450;
}

.rapidinha-store-card.selected .rapidinha-select-store-btn:hover {
    background: #3a9942;
}

/* Store List */
.rapidinha-stores-list {
    display: grid;
    gap: 30px;
    margin: 20px 0;
}

.rapidinha-stores-list[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.rapidinha-stores-list[data-columns="3"] {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.rapidinha-stores-list[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.rapidinha-store-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rapidinha-store-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

.rapidinha-store-item h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
}

.rapidinha-store-item p {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.rapidinha-store-item a.button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.rapidinha-store-item a.button:hover {
    background: #005a87;
}

/* Stock Availability */
.rapidinha-stock-info {
    margin: 15px 0;
    padding: 12px;
    background: #f0f8ff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.rapidinha-stock-info.out-of-stock {
    background: #fff0f0;
    border-left-color: #dc3232;
}

.rapidinha-stock-info.in-stock {
    background: #f0f8f0;
    border-left-color: #46b450;
}

/* Modal de Seleção de Loja - Estilo Moderno */
.rapidinha-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.rapidinha-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { 
        transform: translateY(24px) scale(0.95);
        opacity: 0;
    }
    to { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.rapidinha-modal-header {
    padding: 24px 24px 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(to bottom, #ffffff, #fafafa);
}

.rapidinha-modal-header h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.rapidinha-modal-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.rapidinha-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.rapidinha-age-verification {
    background: linear-gradient(to right, #fef3c7, #fde68a);
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #fbbf24;
    box-shadow: 0 1px 3px rgba(251, 191, 36, 0.1);
}

.rapidinha-age-verification label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #78350f;
    font-weight: 500;
    user-select: none;
}

.rapidinha-age-verification input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid #f59e0b;
    transition: all 0.2s;
}

.rapidinha-age-verification input[type="checkbox"]:checked {
    background: #f59e0b;
}

.rapidinha-cep-search {
    margin-bottom: 24px;
    padding: 18px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.rapidinha-cep-search h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.rapidinha-cep-input-group {
    display: flex;
    gap: 8px;
}

.rapidinha-cep-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: all 0.2s;
    background: #ffffff;
}

.rapidinha-cep-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rapidinha-cep-input-group input::placeholder {
    color: #9ca3af;
}

.rapidinha-cep-input-group button {
    padding: 10px 20px;
    background: linear-gradient(to bottom, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rapidinha-cep-input-group button:hover {
    background: linear-gradient(to bottom, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rapidinha-cep-input-group button:active {
    transform: translateY(0);
}

.rapidinha-cep-input-group button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rapidinha-cep-result {
    margin-top: 12px;
    padding: 12px 14px;
    background: linear-gradient(to right, #d1fae5, #a7f3d0);
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    color: #065f46;
    font-size: 13px;
    font-weight: 500;
    display: none;
}

.rapidinha-modal-stores-list {
    max-height: 340px;
    overflow-y: auto;
    margin: -4px;
    padding: 4px;
}

.rapidinha-modal-stores-list::-webkit-scrollbar {
    width: 8px;
}

.rapidinha-modal-stores-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.rapidinha-modal-stores-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.rapidinha-modal-stores-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.rapidinha-modal-stores-list h3 {
    margin: 0 0 14px 0;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.rapidinha-modal-store-item {
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    position: relative;
}

.rapidinha-modal-store-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.2s;
}

.rapidinha-modal-store-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateX(2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rapidinha-modal-store-item:hover::before {
    background: #3b82f6;
}

.rapidinha-modal-store-item.selected {
    border-color: #10b981;
    background: linear-gradient(to right, #d1fae5, #a7f3d0);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.rapidinha-modal-store-item.selected::before {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.rapidinha-modal-store-item h4 {
    margin: 0 0 6px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.rapidinha-modal-store-item p {
    margin: 2px 0 0 16px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.rapidinha-modal-store-distance {
    display: inline-block;
    margin-top: 8px;
    margin-left: 16px;
    padding: 4px 10px;
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: #fff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.rapidinha-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    background: linear-gradient(to top, #fafafa, #ffffff);
}

.rapidinha-modal-footer button {
    padding: 12px 32px;
    background: linear-gradient(to bottom, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 280px;
}

.rapidinha-modal-footer button:hover:not(:disabled) {
    background: linear-gradient(to bottom, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.rapidinha-modal-footer button:active:not(:disabled) {
    transform: translateY(0);
}

.rapidinha-modal-footer button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

/* Botão Flutuante WhatsApp */
.rapidinha-whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.rapidinha-whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: all 0.3s ease;
}

.rapidinha-whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.rapidinha-whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.rapidinha-whatsapp-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.rapidinha-whatsapp-float:hover .rapidinha-whatsapp-tooltip {
    opacity: 1;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .rapidinha-stores-grid {
        grid-template-columns: 1fr;
    }
    
    .rapidinha-stores-list {
        grid-template-columns: 1fr !important;
    }
    
    .rapidinha-store-selector {
        padding: 10px;
        text-align: center;
    }
    
    .rapidinha-store-selector label {
        display: block;
        margin-bottom: 8px;
        font-size: 13px;
    }
    
    .rapidinha-store-select {
        display: block;
        width: 100%;
        max-width: 100%;
        font-size: 13px;
    }
    
    .rapidinha-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .rapidinha-modal-header,
    .rapidinha-modal-body,
    .rapidinha-modal-footer {
        padding: 15px;
    }
    
    .rapidinha-modal-header h2 {
        font-size: 20px;
    }
    
    .rapidinha-cep-input-group {
        flex-direction: column;
    }
    
    .rapidinha-cep-input-group button {
        width: 100%;
    }
    
    .rapidinha-whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .rapidinha-whatsapp-float a {
        width: 55px;
        height: 55px;
    }
    
    .rapidinha-whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
    
    .rapidinha-whatsapp-tooltip {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .rapidinha-store-card {
        padding: 15px;
    }
    
    .rapidinha-store-item {
        padding: 15px;
    }
    
    .rapidinha-modal-header h2 {
        font-size: 18px;
    }
    
    .rapidinha-modal-store-item {
        padding: 12px;
    }
}
