.pfc-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    display: none;
    animation: pfcSlideIn .5s ease-out forwards;
}

.pfc-widget.visible {
    display: block;
}

.pfc-widget.pfc-position-bottom-right {
    bottom: 24px;
    right: 24px;
}

.pfc-widget.pfc-position-bottom-left {
    bottom: 24px;
    left: 24px;
}

.pfc-widget.pfc-position-top-right {
    top: 24px;
    right: 24px;
}

.pfc-widget.pfc-position-top-left {
    top: 24px;
    left: 24px;
}

.pfc-widget.pfc-position-bottom-center {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
}

.pfc-widget.pfc-position-bottom-center.visible {
    animation: pfcSlideInCenter .5s ease-out forwards;
}

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

@keyframes pfcSlideInCenter {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.pfc-widget-content {
    background: var(--pfc-bg-color, #ffffff);
    color: var(--pfc-text-color, #333333);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    width: 420px;
    max-width: calc(100vw - 40px);
    position: relative;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.pfc-widget-content * {
    box-sizing: border-box;
}

/* Inline shortcode wrapper */
.pfc-shortcode-container {
    margin: 28px 0;
    clear: both;
}

.pfc-shortcode-container .pfc-widget-content {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pfc-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--pfc-text-color, #333333);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pfc-close:hover {
    opacity: 1;
}

.pfc-step {
    display: none;
}

.pfc-step.active {
    display: block;
}

.pfc-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--pfc-text-color, #333333);
    padding-right: 20px;
}

.pfc-rating-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.pfc-rating-btn {
    flex: 1;
    background: transparent;
    border-radius: 8px;
    padding: 10px 4px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.pfc-rating-btn-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pfc-rating-emoji {
    font-size: 28px;
    transition: transform 0.2s;
}

.pfc-rating-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Intelligent color borders */
.pfc-rating-btn.rating-1 {
    border-color: rgba(220, 38, 38, 0.25);
    color: #dc2626;
}
.pfc-rating-btn.rating-2 {
    border-color: rgba(249, 115, 22, 0.25);
    color: #ea580c;
}
.pfc-rating-btn.rating-3 {
    border-color: rgba(234, 179, 8, 0.25);
    color: #ca8a04;
}
.pfc-rating-btn.rating-4 {
    border-color: rgba(34, 197, 94, 0.25);
    color: #16a34a;
}
.pfc-rating-btn.rating-5 {
    border-color: rgba(22, 163, 74, 0.25);
    color: #15803d;
}

.pfc-rating-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pfc-rating-btn.rating-1:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}
.pfc-rating-btn.rating-2:hover {
    background: #f97316;
    color: #ffffff;
    border-color: #f97316;
}
.pfc-rating-btn.rating-3:hover {
    background: #eab308;
    color: #ffffff;
    border-color: #eab308;
}
.pfc-rating-btn.rating-4:hover {
    background: #22c55e;
    color: #ffffff;
    border-color: #22c55e;
}
.pfc-rating-btn.rating-5:hover {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
}

.pfc-rating-btn:hover .pfc-rating-emoji {
    transform: scale(1.15);
}

.pfc-rating-btn:active {
    transform: translateY(0);
}

.pfc-form-group {
    margin-bottom: 16px;
}

.pfc-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--pfc-text-color, #333333);
}

.pfc-required {
    color: #d63638;
    margin-left: 3px;
}

.pfc-optional {
    font-weight: 400;
    opacity: 0.6;
    font-size: 12px;
    margin-left: 4px;
}

.pfc-input,
.pfc-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dddddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
    color: var(--pfc-text-color, #333333);
    background: var(--pfc-bg-color, #ffffff);
}

.pfc-input:focus,
.pfc-textarea:focus {
    outline: none;
    border-color: var(--pfc-primary-color, #0073aa);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.pfc-textarea {
    resize: vertical;
    min-height: 80px;
}

.pfc-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.pfc-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pfc-btn-primary {
    background: var(--pfc-primary-color, #0073aa);
    color: #ffffff;
}

.pfc-btn-primary:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

.pfc-btn-secondary {
    background: transparent;
    color: var(--pfc-text-color, #333333);
    border: 1px solid #dddddd;
}

.pfc-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
}

.pfc-btn-skip {
    flex: 0 0 auto;
    padding: 12px 16px;
}

.pfc-success-icon,
.pfc-error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.pfc-success-icon {
    background: #e7f5ec;
    color: #00a32a;
}

.pfc-error-icon {
    background: #fce8e8;
    color: #d63638;
}

.pfc-step-success .pfc-title,
.pfc-step-error .pfc-title {
    text-align: center;
    padding-right: 0;
}

.pfc-step-error p {
    text-align: center;
    margin: 10px 0 0 0;
    opacity: 0.8;
}

@media (max-width: 480px) {
    .pfc-widget {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        transform: none !important;
    }
    .pfc-widget.pfc-position-bottom-center {
        left: 12px !important;
        transform: none !important;
    }
    .pfc-widget.pfc-position-bottom-center.visible {
        animation: pfcSlideIn .5s ease-out forwards;
    }
    .pfc-widget-content {
        width: 100%;
        max-width: none;
        padding: 20px;
    }
    .pfc-rating-buttons {
        gap: 6px;
    }
    .pfc-rating-btn {
        padding: 8px 2px;
    }
    .pfc-rating-emoji {
        font-size: 24px;
    }
    .pfc-rating-label {
        font-size: 9px;
    }
}
