/**
 * DreamWeb Tools Frontend Styles
 *
 * @package DreamWeb_Tools
 * @since 1.0.0
 */

/* Shortcode Styles */
.dreamweb-tools-shortcode {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* Contact Form */
.dreamweb-contact-form {
    max-width: 600px;
}

.dreamweb-contact-form h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.dreamweb-form .form-group {
    margin-bottom: 20px;
}

.dreamweb-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.dreamweb-form input[type="text"],
.dreamweb-form input[type="email"],
.dreamweb-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.dreamweb-form input[type="text"]:focus,
.dreamweb-form input[type="email"]:focus,
.dreamweb-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.dreamweb-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Newsletter Form */
.dreamweb-newsletter-signup {
    max-width: 500px;
    text-align: center;
}

.dreamweb-newsletter-signup h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.dreamweb-newsletter-signup p {
    color: #666;
    margin-bottom: 20px;
}

.form-group.inline {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.form-group.inline input {
    flex: 1;
    margin-bottom: 0;
}

/* Stats Widget */
.dreamweb-stats-widget {
    text-align: center;
}

.dreamweb-stats-widget h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    display: inline-block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Default Widget */
.dreamweb-default-widget {
    text-align: center;
}

.dreamweb-default-widget h3 {
    margin-top: 0;
    color: #333;
}

.widget-content {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* Button Styles */
.dreamweb-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.dreamweb-button:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.dreamweb-button:active {
    transform: translateY(0);
}

.dreamweb-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading States */
.dreamweb-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.dreamweb-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0073aa;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.dreamweb-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 15px 0;
    font-weight: 500;
}

.dreamweb-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dreamweb-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dreamweb-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Counter Animation */
.stat-number[data-counter] {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dreamweb-tools-shortcode {
        padding: 15px;
        margin: 15px 0;
    }
    
    .form-group.inline {
        flex-direction: column;
    }
    
    .form-group.inline input,
    .form-group.inline .dreamweb-button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .stat-number {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .dreamweb-contact-form,
    .dreamweb-newsletter-signup {
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
