/* Listrak Footer Form Styles */
.listrak-footer-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #e67e22; /* Default orange - can be overridden */
    color: white;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.listrak-footer-container.show {
    transform: translateY(0);
}

.listrak-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Horizontal layout (like your original form) */
.listrak-footer-container.listrak-horizontal .listrak-footer-inner {
    justify-content: space-between;
    padding: 12px 20px;
    align-items: center;
    max-width: none;
}

.listrak-footer-container.listrak-horizontal .listrak-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    gap: 20px;
    flex-wrap: nowrap;
}

.listrak-footer-container.listrak-horizontal .listrak-content h3 {
    margin: 0;
    font-size: 15px;
    font-weight: normal;
    line-height: 1.2;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listrak-footer-container.listrak-horizontal .listrak-content p {
    display: none; /* Always hide description in horizontal layout like original */
}

.listrak-footer-container.listrak-horizontal .form-group {
    margin: 0;
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Vertical layout (centered) */
.listrak-footer-container.listrak-vertical .listrak-footer-inner {
    justify-content: center;
}

.listrak-footer-container.listrak-vertical .listrak-content {
    text-align: center;
    flex: 1;
}

.listrak-footer-container.listrak-vertical .listrak-content h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.listrak-footer-container.listrak-vertical .listrak-content p {
    margin: 0 0 20px 0;
    font-size: 16px;
    opacity: 0.9;
}

.listrak-footer-container.listrak-vertical .form-group {
    max-width: 400px;
    margin: 0 auto;
}

.listrak-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listrak-close:hover,
.listrak-close:focus {
    opacity: 1;
    outline: none;
}

.form-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.listrak-content input[type="email"] {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    font-size: 14px;
    outline: none;
    min-width: 200px;
    background: white;
    color: #333;
    transition: border-color 0.2s;
}

.listrak-content input[type="email"]:focus {
    border-color: rgba(255,255,255,0.8);
}

.listrak-content input[type="submit"] {
    padding: 8px 16px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.listrak-content input[type="submit"]:hover {
    background: #34495e;
    transform: translateY(-1px);
}

.listrak-content input[type="submit"]:active {
    transform: translateY(0);
}

.listrak-content input[type="submit"]:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* Success state */
.listrak-footer-container.success {
    background: #27ae60 !important;
}

.listrak-footer-container.success .listrak-content h3:before {
    content: "✓ ";
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .listrak-footer-inner {
        padding: 10px 15px;
    }
    
    /* Horizontal layout on mobile - still stacks but more compact */
    .listrak-footer-container.listrak-horizontal .listrak-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .listrak-footer-container.listrak-horizontal .listrak-content h3 {
        margin: 0;
        font-size: 13px;
        flex: none;
        white-space: normal;
    }
    
    .listrak-footer-container.listrak-horizontal .listrak-content p {
        font-size: 12px;
        margin: 0;
        flex: none;
    }
    
    .listrak-footer-container.listrak-horizontal .form-group {
        flex-direction: row;
        gap: 8px;
        width: 100%;
        justify-content: center;
    }
    
    .listrak-content input[type="email"] {
        min-width: auto;
        width: 180px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .listrak-content input[type="submit"] {
        width: auto;
        font-size: 16px;
        padding: 8px 16px;
    }
    
    /* Vertical layout on mobile */
    .listrak-footer-container.listrak-vertical .listrak-content h3 {
        font-size: 18px;
    }
    
    .listrak-footer-container.listrak-vertical .listrak-content p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .listrak-footer-container.listrak-vertical .form-group {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .listrak-footer-inner {
        padding: 8px 12px;
    }
    
    .listrak-content input[type="email"],
    .listrak-content input[type="submit"] {
        font-size: 16px;
        padding: 8px 12px;
    }
    
    .listrak-footer-container.listrak-horizontal .listrak-content h3 {
        font-size: 12px;
    }
}

/* Animation for showing the form */
.listrak-footer-container.slide-in {
    animation: slideInUp 0.4s ease-out forwards;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .listrak-footer-container,
    .listrak-content input[type="submit"] {
        transition: none;
    }
    
    .listrak-footer-container.slide-in {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .listrak-footer-container {
        border-top: 2px solid white;
    }
    
    .listrak-content input[type="email"] {
        border: 2px solid #333;
    }
}