/**
 * Frontend Form Styles
 */

.ccf-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(249,250,251,0.98));
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
    position: relative;
    overflow: hidden;
    animation: formPulse 4s ease-in-out infinite;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

@keyframes formPulse {
    0%, 100% { 
        transform: translateY(0) scale(1); 
        box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
    }
    50% { 
        transform: translateY(-5px) scale(1.01); 
        box-shadow: 0 25px 70px rgba(102, 126, 234, 0.25);
    }
}

.ccf-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: gradientSlide 3s linear infinite;
}

@keyframes gradientSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.ccf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .ccf-form-row {
        grid-template-columns: 1fr;
    }
}

.ccf-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.ccf-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    transition: color 0.3s ease;
}

.ccf-form-group:hover label {
    color: #667eea;
}

.ccf-form-group input,
.ccf-form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #764ba2) border-box;
    transition: all 0.3s ease;
}

.ccf-form-group input:focus,
.ccf-form-group textarea:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #764ba2, #667eea) border-box;
}

.ccf-form-submit {
    text-align: center;
    margin-top: 2rem;
}

.ccf-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.ccf-submit-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.ccf-submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ccf-submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.ccf-btn-loader {
    display: inline-flex;
    align-items: center;
}

.ccf-spinner {
    animation: rotate 2s linear infinite;
    height: 20px;
    width: 20px;
}

.ccf-spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.ccf-form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    display: none;
    animation: slideInUp 0.5s ease;
}

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

.ccf-form-message.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.ccf-form-message.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}