/**
 * Frontend Styles for Business Toolkit
 */

/* Contact Form Styles */
.bt-contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bt-form-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.5em;
}

.bt-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

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

.bt-form-group-half {
    flex: 1;
}

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

.bt-form-group .required {
    color: #d63638;
}

.bt-form-group input,
.bt-form-group textarea,
.bt-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.bt-form-group input:focus,
.bt-form-group textarea:focus,
.bt-form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.bt-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.bt-submit-btn {
    background: #0073aa;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
}

.bt-submit-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.bt-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.bt-btn-loading {
    display: none;
}

.bt-submit-btn.loading .bt-btn-text {
    display: none;
}

.bt-submit-btn.loading .bt-btn-loading {
    display: inline;
}

.bt-form-messages {
    margin-top: 20px;
}

.bt-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
}

.bt-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

/* Testimonials Styles */
.bt-testimonials-wrapper {
    margin: 30px 0;
}

.bt-testimonials-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.bt-columns-1 {
    grid-template-columns: 1fr;
}

.bt-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.bt-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.bt-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.bt-testimonial-item {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.bt-testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.bt-testimonial-item::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4em;
    color: #0073aa;
    opacity: 0.3;
    font-family: serif;
}

.bt-testimonial-rating {
    margin-bottom: 15px;
}

.bt-testimonial-text {
    margin-bottom: 20px;
    line-height: 1.6;
}

.bt-testimonial-text blockquote {
    margin: 0;
    padding: 0;
    border: none;
    font-style: italic;
    color: #555;
}

.bt-testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.bt-author-image {
    flex-shrink: 0;
}

.bt-author-image img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0073aa;
}

.bt-author-info {
    flex: 1;
}

.bt-author-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.bt-author-details {
    color: #666;
    font-size: 0.9em;
}

/* Star Rating Styles */
.bt-stars,
.bt-rating-display {
    display: flex;
    gap: 2px;
}

.bt-star {
    color: #ffc107;
    font-size: 1.2em;
}

.bt-star-empty {
    color: #ddd;
}

/* Rating Input Styles */
.bt-rating-input {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
    margin-top: 10px;
}

.bt-rating-input input[type="radio"] {
    display: none;
}

.bt-star-label {
    font-size: 2em;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.bt-rating-input input[type="radio"]:checked ~ .bt-star-label,
.bt-rating-input .bt-star-label:hover,
.bt-rating-input .bt-star-label:hover ~ .bt-star-label {
    color: #ffc107;
}

/* Testimonials Slider */
.bt-testimonials-slider {
    position: relative;
}

.bt-testimonials-slider .bt-testimonial-item {
    display: none;
}

.bt-testimonials-slider .bt-testimonial-item:first-child {
    display: block;
}

.bt-slider-nav {
    text-align: center;
    margin-top: 20px;
}

.bt-slider-nav button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.bt-slider-nav button:hover {
    background: #005a87;
}

/* Testimonials List Layout */
.bt-testimonials-list .bt-testimonial-item {
    margin-bottom: 30px;
    padding: 20px;
}

.bt-testimonials-list .bt-testimonial-author {
    flex-direction: row;
}

/* Analytics Dashboard */
.bt-analytics-dashboard {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

.bt-analytics-header h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.bt-analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.bt-stat-box {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.bt-stat-number {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.bt-stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.bt-analytics-section {
    margin-bottom: 30px;
}

.bt-analytics-section h4 {
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.bt-analytics-table table {
    width: 100%;
    border-collapse: collapse;
}

.bt-analytics-table th,
.bt-analytics-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bt-analytics-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.bt-analytics-table tr:hover {
    background: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bt-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .bt-columns-2,
    .bt-columns-3,
    .bt-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .bt-testimonial-author {
        flex-direction: column;
        text-align: center;
    }
    
    .bt-analytics-stats {
        grid-template-columns: 1fr;
    }
    
    .bt-contact-form-wrapper {
        padding: 15px;
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .bt-testimonial-item {
        padding: 20px;
    }
    
    .bt-stat-number {
        font-size: 2em;
    }
    
    .bt-form-group input,
    .bt-form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Accessibility Improvements */
.bt-form-group input:focus,
.bt-form-group textarea:focus,
.bt-submit-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.bt-testimonial-item:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Animation Classes */
.bt-fade-in {
    animation: btFadeIn 0.5s ease-in;
}

@keyframes btFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bt-slide-up {
    animation: btSlideUp 0.3s ease-out;
}

@keyframes btSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.bt-loading {
    position: relative;
    pointer-events: none;
}

.bt-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: btSpin 1s linear infinite;
}

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

/* No Results States */
.bt-no-testimonials {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Print Styles */
@media print {
    .bt-submit-btn,
    .bt-slider-nav {
        display: none;
    }
    
    .bt-testimonial-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

