/*
 * JiffyTaps - Professional Review Management Styles
 * 
 * @package JiffyTaps
 * @author Techy Tek
 * @copyright 2025 Techy Tek. All rights reserved.
 * @license Proprietary
 * @version 1.0.0
 * 
 * PROPRIETARY SOFTWARE NOTICE:
 * This stylesheet is proprietary software owned by Techy Tek and is protected by
 * copyright law and international treaties. Unauthorized copying, modification, 
 * distribution, or use is strictly prohibited and may result in legal action.
 * 
 * PATENT PENDING:
 * This stylesheet incorporates design elements and user interface innovations
 * that are part of Techy Tek's patent-pending Smart Review Funnel Technology™.
 * 
 * All rights reserved. No part of this stylesheet may be reproduced, distributed,
 * or transmitted in any form or by any means without the prior written permission
 * of Techy Tek.
 * 
 * For licensing information: legal@techytek.com
 * For technical support: support@jiffytaps.com
 * 
 * © 2025 Techy Tek. All rights reserved.
 */

/* ==================================================
   CORE CONTAINER AND LAYOUT
   ================================================== */

#jiffytaps-container {
    max-width: 520px;
    margin: 25px auto;
    padding: 25px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    box-sizing: border-box;
    line-height: 1.6;
}

/* Gradient border effect */
#jiffytaps-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    border-radius: 28px;
    z-index: -1;
    padding: 4px;
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.jiffytaps-form-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 45px;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.jiffytaps-form-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(102, 126, 234, 0.3) 25%, 
        rgba(118, 75, 162, 0.3) 50%, 
        rgba(102, 126, 234, 0.3) 75%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmerEffect 4s ease-in-out infinite;
}

@keyframes shimmerEffect {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

/* ==================================================
   HEADER SECTION
   ================================================== */

.jiffytaps-header {
    margin-bottom: 35px;
    position: relative;
}

.jiffytaps-title {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 2.4em;
    font-weight: 300;
    line-height: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: -0.5px;
}

.jiffytaps-powered {
    font-size: 0.85em;
    color: #888;
    margin-top: 8px;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.jiffytaps-powered:hover {
    opacity: 1;
}

.jiffytaps-powered a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.jiffytaps-powered a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #667eea;
    transition: width 0.3s ease;
}

.jiffytaps-powered a:hover::after {
    width: 100%;
}

/* ==================================================
   RATING SECTION
   ================================================== */

.jiffytaps-rating-section {
    margin-bottom: 30px;
}

.jiffytaps-rating-label {
    display: block;
    margin-bottom: 25px;
    font-size: 1.35em;
    color: #444;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.jiffytaps-star-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    padding: 15px 0;
}

.jiffytaps-star {
    font-size: 3.2em;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    line-height: 1;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transform-origin: center center;
}

.jiffytaps-star::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.jiffytaps-star:hover::before,
.jiffytaps-star.active::before {
    transform: translate(-50%, -50%) scale(1);
}

.jiffytaps-star:hover,
.jiffytaps-star.active {
    color: #ffd700;
    transform: scale(1.2) rotate(8deg);
    text-shadow: 
        0 4px 8px rgba(255, 215, 0, 0.4),
        0 2px 4px rgba(255, 215, 0, 0.6);
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.3));
}

.jiffytaps-star:hover ~ .jiffytaps-star {
    color: #e0e0e0;
    transform: scale(1) rotate(0deg);
}

.jiffytaps-star:nth-child(1):hover,
.jiffytaps-star:nth-child(1).active { animation-delay: 0s; }
.jiffytaps-star:nth-child(2):hover,
.jiffytaps-star:nth-child(2).active { animation-delay: 0.1s; }
.jiffytaps-star:nth-child(3):hover,
.jiffytaps-star:nth-child(3).active { animation-delay: 0.2s; }
.jiffytaps-star:nth-child(4):hover,
.jiffytaps-star:nth-child(4).active { animation-delay: 0.3s; }
.jiffytaps-star:nth-child(5):hover,
.jiffytaps-star:nth-child(5).active { animation-delay: 0.4s; }

/* Sparkle effect for 5-star rating */
.jiffytaps-star:nth-child(5).active::after {
    content: "✨";
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 0.4em;
    opacity: 0;
    animation: sparkleAnimation 1.5s ease-in-out infinite;
}

@keyframes sparkleAnimation {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

.jiffytaps-rating-text {
    font-size: 1.25em;
    color: #666;
    margin: 15px 0 30px 0;
    min-height: 40px;
    font-weight: 500;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.1px;
}

.jiffytaps-rating-text.preview {
    color: #667eea !important;
    font-weight: 600 !important;
    transform: scale(1.05);
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

/* ==================================================
   COMMENT SECTION
   ================================================== */

.jiffytaps-comment-section {
    margin: 30px 0;
    text-align: left;
    animation: slideDownFade 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-20px);
    animation-fill-mode: forwards;
}

@keyframes slideDownFade {
    from { 
        opacity: 0; 
        transform: translateY(-30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.jiffytaps-comment-label {
    display: block;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #444;
    font-weight: 600;
    line-height: 1.4;
}

.jiffytaps-comment-box {
    width: 100%;
    min-height: 130px;
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    line-height: 1.6;
    color: #333;
}

.jiffytaps-comment-box::placeholder {
    color: #999;
    font-style: italic;
}

.jiffytaps-comment-box:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.15),
        0 4px 12px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-3px);
}

.jiffytaps-comment-box.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15) !important;
    animation: pulseError 0.6s ease-in-out;
}

@keyframes pulseError {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.02) translateY(-2px); }
}

/* ==================================================
   SUBMIT BUTTON
   ================================================== */

.jiffytaps-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    margin-top: 25px;
    width: 100%;
    max-width: 250px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.jiffytaps-submit-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.6s ease;
}

.jiffytaps-submit-btn:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.jiffytaps-submit-btn:hover::before {
    left: 100%;
}

.jiffytaps-submit-btn:active {
    transform: translateY(-2px);
    transition: transform 0.1s ease;
}

.jiffytaps-submit-btn:focus {
    outline: none;
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.4),
        0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* ==================================================
   RESULT MESSAGE SECTION
   ================================================== */

.jiffytaps-result {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 18px;
    border-left: 6px solid #667eea;
    display: none;
    animation: fadeInUpResult 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.08),
        0 3px 8px rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.jiffytaps-result::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: progressBar 2s ease-in-out;
}

@keyframes progressBar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeInUpResult {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.jiffytaps-result h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.5em;
    font-weight: 600;
    line-height: 1.3;
}

.jiffytaps-result p {
    margin-bottom: 15px;
    color: #4a5568;
    line-height: 1.6;
    font-size: 1.05em;
}

.jiffytaps-result p:last-child {
    margin-bottom: 0;
}

.jiffytaps-result a {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.jiffytaps-result a:hover {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    text-decoration: none;
}

/* Success message styling */
.jiffytaps-result.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left-color: #22c55e;
}

.jiffytaps-result.success::before {
    background: linear-gradient(90deg, #22c55e, #16a34a, #22c55e);
}

/* Error message styling */
.jiffytaps-result.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-left-color: #dc2626;
}

.jiffytaps-result.error::before {
    background: linear-gradient(90deg, #dc2626, #b91c1c, #dc2626);
}

/* ==================================================
   FOOTER SECTION
   ================================================== */

.jiffytaps-footer {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    font-size: 0.8em;
    color: #999;
    line-height: 1.5;
}

.jiffytaps-footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.jiffytaps-footer a:hover {
    color: #764ba2;
}

/* ==================================================
   LOADING STATES
   ================================================== */

.jiffytaps-loading .jiffytaps-submit-btn {
    opacity: 0.8;
    cursor: not-allowed;
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    transform: none !important;
    box-shadow: none !important;
}

.jiffytaps-loading .jiffytaps-submit-btn::after {
    content: "⏳ Submitting...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}

.jiffytaps-loading .jiffytaps-star {
    pointer-events: none;
    opacity: 0.6;
}

.jiffytaps-loading .jiffytaps-comment-box {
    opacity: 0.7;
    pointer-events: none;
}

/* Pulse loading animation */
.jiffytaps-loading .jiffytaps-form-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    border-radius: 25px;
    animation: pulseLoading 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseLoading {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* ==================================================
   ANIMATION UTILITIES
   ================================================== */

.jiffytaps-star.shake {
    animation: shakeStars 0.6s ease-in-out;
}

@keyframes shakeStars {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-8px) rotate(-3deg); }
    75% { transform: translateX(8px) rotate(3deg); }
}

.jiffytaps-bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3) translateY(50px); }
    50% { opacity: 1; transform: scale(1.1) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==================================================
   RESPONSIVE DESIGN
   ================================================== */

@media (max-width: 768px) {
    #jiffytaps-container {
        padding: 20px 15px;
        margin: 20px auto;
        max-width: 95%;
    }
    
    .jiffytaps-form-container {
        padding: 35px 25px;
    }
    
    .jiffytaps-title {
        font-size: 2em;
        margin-bottom: 10px;
    }
    
    .jiffytaps-star-rating {
        gap: 8px;
        padding: 10px 0;
    }
    
    .jiffytaps-star {
        font-size: 2.8em;
    }
    
    .jiffytaps-submit-btn {
        width: 100%;
        max-width: none;
        padding: 18px 40px;
        font-size: 1.1em;
    }
    
    .jiffytaps-comment-box {
        min-height: 120px;
        padding: 18px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .jiffytaps-rating-label {
        font-size: 1.2em;
    }
    
    .jiffytaps-result {
        padding: 20px;
        margin-top: 25px;
    }
    
    .jiffytaps-result h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    #jiffytaps-container {
        padding: 15px 10px;
        margin: 15px auto;
    }
    
    .jiffytaps-form-container {
        padding: 30px 20px;
    }
    
    .jiffytaps-title {
        font-size: 1.8em;
    }
    
    .jiffytaps-star {
        font-size: 2.5em;
    }
    
    .jiffytaps-star-rating {
        gap: 6px;
    }
    
    .jiffytaps-rating-label {
        font-size: 1.1em;
        margin-bottom: 20px;
    }
    
    .jiffytaps-submit-btn {
        padding: 16px 35px;
        font-size: 1em;
    }
    
    .jiffytaps-comment-box {
        min-height: 100px;
        padding: 15px;
    }
}

/* ==================================================
   ACCESSIBILITY IMPROVEMENTS
   ================================================== */

.jiffytaps-star:focus {
    outline: 3px solid #667eea;
    outline-offset: 6px;
    border-radius: 6px;
}

.jiffytaps-submit-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 4px;
}

.jiffytaps-comment-box:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Screen reader only content */
.jiffytaps-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================================================
   HIGH CONTRAST MODE SUPPORT
   ================================================== */

@media (prefers-contrast: high) {
    .jiffytaps-star {
        color: #000;
        text-shadow: none;
    }
    
    .jiffytaps-star.active,
    .jiffytaps-star:hover {
        color: #ff6600;
        background-color: #fff;
        border: 2px solid #000;
        border-radius: 50%;
    }
    
    .jiffytaps-submit-btn {
        background: #000;
        border: 3px solid #fff;
        color: #fff;
    }
    
    .jiffytaps-form-container {
        border: 2px solid #000;
        background: #fff;
    }
    
    .jiffytaps-comment-box {
        border: 2px solid #000;
        background: #fff;
    }
}

/* ==================================================
   REDUCED MOTION SUPPORT
   ================================================== */

@media (prefers-reduced-motion: reduce) {
    .jiffytaps-star,
    .jiffytaps-submit-btn,
    .jiffytaps-comment-box,
    .jiffytaps-result,
    .jiffytaps-form-container,
    #jiffytaps-container::before {
        transition: none;
        animation: none;
    }
    
    .jiffytaps-star:hover,
    .jiffytaps-star.active {
        transform: none;
    }
    
    .jiffytaps-submit-btn:hover {
        transform: none;
    }
    
    .jiffytaps-comment-box:focus {
        transform: none;
    }
}

/* ==================================================
   PRINT STYLES
   ================================================== */

@media print {
    #jiffytaps-container {
        max-width: none;
        margin: 0;
        padding: 20px;
        page-break-inside: avoid;
    }
    
    .jiffytaps-form-container {
        box-shadow: none;
        border: 1px solid #000;
        background: #fff;
    }
    
    .jiffytaps-star {
        color: #000;
    }
    
    .jiffytaps-submit-btn {
        background: #666;
        color: #fff;
        border: 1px solid #000;
    }
    
    .jiffytaps-powered {
        display: none;
    }
}

/* ==================================================
   BROWSER-SPECIFIC FIXES
   ================================================== */

/* Safari specific fixes */
@supports (-webkit-appearance: none) {
    .jiffytaps-comment-box {
        -webkit-appearance: none;
    }
    
    .jiffytaps-submit-btn {
        -webkit-appearance: none;
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    .jiffytaps-star {
        -moz-user-select: none;
    }
}

/* Edge specific fixes */
@supports (-ms-ime-align: auto) {
    .jiffytaps-form-container {
        backdrop-filter: none;
    }
}

/*
 * End of JiffyTaps Professional Styles
 * 
 * This stylesheet contains proprietary design elements and user interface
 * innovations protected by copyright law and patent-pending technology.
 * 
 * Reverse engineering, copying, or unauthorized use is strictly prohibited
 * and will be prosecuted to the full extent of the law.
 * 
 * © 2025 Techy Tek. All rights reserved.
 * Patent Pending - Smart Review Funnel Technology™
 * 
 * For licensing information: legal@techytek.com
 * For support: support@jiffytaps.com
 * 
 * JiffyTaps is a trademark of Techy Tek.
 * Smart Review Funnel Technology is a trademark of Techy Tek.
 */