// _formpreset.scss
.form-preset-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
}

.form-preset-header {
    text-align: center;
    margin-bottom: 50px;

    .header-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 70px;
        border-radius: 20px;
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        margin-bottom: 20px;
        color: white;
        font-size: 36px;
        box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
    }

    h1 {
        font-size: 25px;
        font-weight: 800;
        margin-bottom: 10px;
        background: linear-gradient(135deg, #4f46e5, #7c3aed);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    p {
        font-size: 1.1rem;
        color: #64748b;
        max-width: 600px;
        margin: 0 auto;
    }
}

.form-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.form-preset-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;

    &:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);

        .card-gradient {
            opacity: 0.9;
        }

        .create-btn {
            transform: translateY(-2px);
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
        }
    }

    .card-gradient {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        transition: opacity 0.3s ease;
    }

    .card-content {
        padding: 30px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;

        .card-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 60px;
            height: 60px;
            border-radius: 16px;
            background: #f1f5f9;
            margin-bottom: 20px;
            color: #4f46e5;
            font-size: 28px;
        }

        h3 {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 10px;
            color: #1e293b;
        }

        p {
            color: #64748b;
            margin-bottom: 25px;
            flex-grow: 1;
            line-height: 1.6;
        }

        .create-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px;
            border-radius: 12px;
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            color: white;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;
            box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);

            &:hover {
                background: linear-gradient(135deg, #4338ca, #6d28d9);
            }

            svg {
                font-size: 20px;
            }
        }
    }
}

.form-preset-footer {
    text-align: center;
    padding: 30px;
    border-radius: 16px;
    background: #f8fafc;
    margin-top: 20px;

    p {
        color: #64748b;
        font-size: 1.1rem;

        a {
            color: #4f46e5;
            font-weight: 600;
            text-decoration: none;
            transition: color 0.2s ease;

            &:hover {
                color: #7c3aed;
                text-decoration: underline;
            }
        }
    }
}

// Responsive adjustments
@media (max-width: 768px) {
    .form-preset-container {
        padding: 30px 15px;
    }

    .form-preset-header {
        h1 {
            font-size: 2rem;
        }

        p {
            font-size: 1rem;
        }
    }

    .form-preset-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-preset-card {
        .card-content {
            padding: 25px 20px;

            h3 {
                font-size: 1.3rem;
            }

            .create-btn {
                padding: 10px 20px;
                font-size: 0.95rem;
            }
        }
    }
}

@media (max-width: 480px) {
    .form-preset-header {
        .header-icon {
            width: 60px;
            height: 60px;
            font-size: 30px;
        }

        h1 {
            font-size: 1.8rem;
        }
    }
}

// Locked form preset styles
.form-preset-card.locked {
    position: relative;
    opacity: 0.7;

    .locked-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(1px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        cursor: pointer;
        transition: background 0.3s ease;

        .lock-badge {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 10px 20px;
            border-radius: 25px;
            font-weight: 600;
            font-size: 14px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            animation: pulse-lock 2s infinite;
            pointer-events: none; // Allow clicks to pass through to overlay
        }
    }

    &:hover {
        transform: translateY(-4px);

        .locked-overlay {
            background: rgba(0, 0, 0, 0.1);
        }
    }
}

.limit-warning {
    margin-top: 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #ececec 100%);
    border: 2px solid #ffffff;
    border-radius: 12px;
    color: #666666;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

@keyframes pulse-lock {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}