/* Component-specific styles for MisEstrellas */

/* Login Components */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px var(--shadow-dark);
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.brand-name {
    color: var(--primary-orange);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.user-type-selector {
    display: flex;
    background: var(--border-color);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 2rem;
}

.type-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-white);
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.type-btn.active {
    background: var(--primary-orange);
    color: white;
}

.login-section {
    display: none;
}

.login-section.active {
    display: block;
}

.toggle-input {
    background: none;
    border: none;
    color: var(--primary-orange);
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0;
    text-decoration: underline;
}

.verification-info {
    font-size: 0.9rem;
    color: var(--secondary-gray);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Business Card Components */
.business-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.business-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-dark);
}

.business-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--border-color);
}

.business-info {
    flex: 1;
}

.business-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-white);
}

.business-address {
    font-size: 0.9rem;
    color: var(--secondary-gray);
    margin-bottom: 0.5rem;
}

.business-stars {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--primary-orange);
    font-weight: 500;
}

.card-arrow {
    color: var(--secondary-gray);
    font-size: 1.2rem;
}

/* Camera Components */
.camera-section {
    margin-bottom: 2rem;
}

.camera-container {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    aspect-ratio: 4/3;
    max-width: 400px;
    margin: 0 auto;
}

#camera-video, #scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.scan-frame {
    width: 250px;
    height: 250px;
    position: relative;
}

.scan-corners {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-orange);
}

.corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.control-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.control-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

/* Status Components */
.status-section {
    text-align: center;
    margin-bottom: 2rem;
}

.status-indicator {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.status-icon {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 1rem;
}

.status-text {
    color: var(--text-white);
    margin: 0;
}

.status-text.processing {
    color: var(--warning-yellow);
}

.status-text.success {
    color: var(--success-green);
}

.status-text.error {
    color: var(--error-red);
}

/* QR Code Components */
.qr-section {
    margin-bottom: 2rem;
}

.qr-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.qr-placeholder {
    padding: 40px 20px;
    color: var(--secondary-gray);
}

.qr-placeholder i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.qr-code-display {
    padding: 20px;
}

.qr-code {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.qr-code canvas {
    border-radius: 8px;
}

.qr-info {
    margin-bottom: 1.5rem;
}

.qr-points {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}

.qr-code-text {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.qr-expires {
    font-size: 0.9rem;
    color: var(--secondary-gray);
}

.qr-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.qr-loading {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Points Counter */
.points-section {
    margin-bottom: 2rem;
}

.points-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.points-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 2rem 0;
}

.counter-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-orange);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-btn:hover {
    background: var(--hover-orange);
    transform: scale(1.1);
}

.counter-btn:disabled {
    background: var(--secondary-gray);
    cursor: not-allowed;
    transform: none;
}

.points-display {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-orange);
}

.points-presets {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.preset-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.preset-btn:hover,
.preset-btn.active {
    border-color: var(--primary-orange);
    background: var(--primary-orange);
    color: white;
}

/* Modal Components */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin: 5% auto;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px var(--shadow-dark);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.large {
    max-width: 700px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-orange);
}

.close-btn {
    background: none;
    border: none;
    color: var(--secondary-gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--text-white);
}

.modal-body {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Success/Error Animations */
.success-animation,
.error-animation {
    text-align: center;
    margin-bottom: 1.5rem;
}

.success-animation i {
    font-size: 4rem;
    color: var(--success-green);
    animation: successPulse 0.6s ease;
}

.error-animation i {
    font-size: 4rem;
    color: var(--error-red);
    animation: errorShake 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Instructions */
.instructions-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.instructions-list {
    list-style: none;
    padding: 0;
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 140, 66, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary-orange);
}

.instruction-number {
    background: var(--primary-orange);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

.instruction-item p {
    margin: 0;
    color: var(--text-white);
}

/* Client Components */
.client-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.client-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-dark);
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border-color);
}

.client-info {
    flex: 1;
}

.client-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-white);
}

.client-contact {
    font-size: 0.9rem;
    color: var(--secondary-gray);
    margin-bottom: 0.5rem;
}

.client-stats-mini {
    display: flex;
    gap: 16px;
}

.client-stats-mini .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--primary-orange);
}

.client-actions {
    text-align: right;
}

.client-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.client-status.active {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-green);
}

.client-status.inactive {
    background: rgba(158, 158, 158, 0.2);
    color: var(--secondary-gray);
}

.last-visit {
    font-size: 0.8rem;
    color: var(--secondary-gray);
}

/* Profile Components */
.profile-header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    text-align: center;
}

.profile-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-orange);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary-orange);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.edit-avatar-btn:hover {
    background: var(--hover-orange);
    transform: scale(1.1);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

.profile-contact {
    color: var(--secondary-gray);
    margin-bottom: 0.5rem;
}

.profile-member-since {
    font-size: 0.9rem;
    color: var(--secondary-gray);
}

.edit-btn {
    background: none;
    border: none;
    color: var(--primary-orange);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.edit-btn:hover {
    background: rgba(255, 140, 66, 0.1);
}

.edit-btn.save-mode {
    color: var(--success-green);
}

/* Business Profile Components */
.business-header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.business-image-container {
    position: relative;
}

.business-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--primary-orange);
}

.edit-image-btn {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: var(--primary-orange);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.edit-image-btn:hover {
    background: var(--hover-orange);
    transform: scale(1.1);
}

.business-basic-info {
    flex: 1;
}

.business-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--primary-orange);
    margin-top: 8px;
}

.rating-count {
    color: var(--secondary-gray);
}

/* Currency Input */
.currency-input {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    color: var(--secondary-gray);
    z-index: 1;
    font-weight: 600;
}

.currency-input .input-field {
    padding-left: 40px;
}

/* Hours Grid */
.hours-grid {
    display: grid;
    gap: 12px;
}

.hour-item {
    display: grid;
    grid-template-columns: 100px 1fr auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 140, 66, 0.05);
    border-radius: 8px;
}

.day-label {
    font-weight: 500;
    color: var(--text-white);
}

.time-input {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    color: var(--text-white);
    font-size: 0.9rem;
}

.time-input:focus {
    border-color: var(--primary-orange);
    outline: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-white);
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--primary-orange);
}

/* Image Options */
.image-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.option-btn {
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 16px;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.option-btn:hover {
    border-color: var(--primary-orange);
    background: rgba(255, 140, 66, 0.1);
}

.option-btn i {
    font-size: 2rem;
    color: var(--primary-orange);
}

.image-guidelines {
    background: rgba(255, 140, 66, 0.1);
    border-radius: 8px;
    padding: 16px;
    border-left: 3px solid var(--primary-orange);
}

.image-guidelines h4 {
    color: var(--primary-orange);
    margin-bottom: 12px;
}

.image-guidelines ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-white);
}

.image-guidelines li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* Transaction History */
.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--input-bg);
    border-radius: 8px;
    margin-bottom: 8px;
}

.transaction-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.transaction-item.earned .transaction-icon {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-green);
}

.transaction-item.redeemed .transaction-icon {
    background: rgba(244, 67, 54, 0.2);
    color: var(--error-red);
}

.transaction-details {
    flex: 1;
}

.transaction-description {
    font-weight: 500;
    color: var(--text-white);
    margin-bottom: 2px;
}

.transaction-date {
    font-size: 0.8rem;
    color: var(--secondary-gray);
}

.transaction-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

.transaction-amount.earned {
    color: var(--success-green);
}

.transaction-amount.redeemed {
    color: var(--error-red);
}

/* Map Components */
.map-container {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.map {
    width: 100%;
    height: 100%;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--card-bg);
    color: var(--secondary-gray);
    text-align: center;
    padding: 40px 20px;
}

.map-placeholder i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.map-note {
    font-size: 0.8rem;
    color: var(--secondary-gray);
    margin-top: 0.5rem;
}

.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.business-info-card {
    position: fixed;
    bottom: 100px;
    left: 20px;
    right: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px var(--shadow-dark);
    z-index: 500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.business-info-card.show {
    transform: translateY(0);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.close-card-btn {
    background: none;
    border: none;
    color: var(--secondary-gray);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
    margin-left: auto;
}

.close-card-btn:hover {
    color: var(--text-white);
}

.card-body {
    padding: 16px;
}

.business-actions {
    display: flex;
    gap: 12px;
    justify-content: space-around;
}

.action-btn {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    flex: 1;
}

.action-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.action-btn i {
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .business-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .hour-item {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .image-options {
        grid-template-columns: 1fr;
    }
    
    .business-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .points-counter {
        gap: 16px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 1rem auto;
        padding: 1.5rem;
    }
    
    .points-counter {
        gap: 12px;
    }
    
    .points-display {
        font-size: 1.5rem;
    }
    
    .counter-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .business-info-card {
        left: 12px;
        right: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
