/**
 * TaxDebug Feedback Widget Styles
 *
 * @package TaxDebug
 */

.td-feedback-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.td-feedback-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    transition: all 0.2s ease;
}

.td-feedback-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.5);
}

.td-feedback-toggle .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.td-feedback-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 360px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.td-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
}

.td-feedback-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.td-feedback-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
}

.td-feedback-close:hover {
    opacity: 1;
}

.td-feedback-form {
    padding: 20px;
}

.td-feedback-field {
    margin-bottom: 16px;
}

.td-feedback-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.td-feedback-type-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.td-feedback-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    color: #6b7280;
    transition: all 0.15s ease;
}

.td-feedback-type-btn:hover {
    border-color: #7c3aed;
    background: #faf5ff;
}

.td-feedback-type-btn.active {
    border-color: #7c3aed;
    background: #faf5ff;
    color: #7c3aed;
}

.td-feedback-type-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.td-feedback-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

.td-feedback-form textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.td-feedback-hints {
    margin-top: 6px;
    font-size: 11px;
    color: #9ca3af;
}

.td-feedback-form input[type="email"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.td-feedback-form input[type="email"]:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.td-feedback-help {
    margin: 4px 0 0;
    font-size: 11px;
    color: #9ca3af;
}

.td-feedback-actions {
    margin-top: 16px;
}

.td-feedback-actions .td-btn {
    width: 100%;
    justify-content: center;
}

.td-feedback-success {
    text-align: center;
    padding: 30px 20px;
}

.td-feedback-success .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #10b981;
    margin-bottom: 12px;
}

.td-feedback-success p {
    margin: 0;
    font-size: 15px;
    color: #374151;
}

.td-feedback-privacy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: #f9fafb;
    font-size: 11px;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
}

.td-feedback-privacy .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #9ca3af;
}

.td-feedback-remote-notice {
    padding: 12px 20px 14px;
    background: #fef3c7;
    font-size: 12px;
    color: #92400e;
    border-top: 1px solid #fcd34d;
}

.td-feedback-remote-notice details {
    user-select: text;
}

.td-feedback-remote-notice details summary {
    cursor: pointer;
    font-weight: 600;
    padding: 4px 0;
    margin-bottom: 8px;
    outline: none;
    list-style-position: outside;
    transition: color 0.2s ease;
}

.td-feedback-remote-notice details summary:hover {
    color: #78350f;
}

.td-feedback-remote-notice details[open] summary {
    margin-bottom: 12px;
    color: #78350f;
}

.td-feedback-remote-notice ul {
    margin: 0 0 12px 20px;
    padding: 0;
    list-style: disc;
    line-height: 1.6;
}

.td-feedback-remote-notice li {
    margin: 4px 0;
    padding-left: 4px;
}

.td-feedback-remote-notice p {
    margin: 12px 0 0;
    font-size: 11px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    line-height: 1.5;
}

.td-feedback-remote-notice strong {
    font-weight: 700;
    color: #78350f;
}

/* Spinning animation for loading state */
@keyframes td-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dashicons.td-spin {
    animation: td-spin 1s linear infinite;
}

/* Loading state styles */
.td-feedback-widget .td-btn {
    position: relative;
    transition: all 0.2s ease;
    overflow: hidden;
}

.td-feedback-widget .td-btn[disabled] {
    opacity: 0.8;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
}

.td-feedback-widget .td-btn span {
    position: relative;
    z-index: 1;
}

.td-feedback-widget .td-btn .dashicons.td-spin {
    display: inline-block;
    margin-right: 4px;
}

/* Pulse effect during loading */
.td-feedback-widget .td-btn[disabled]::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.1);
    animation: td-pulse 1.5s ease-in-out infinite;
}

@keyframes td-pulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}
