/* Ducky Doubles — shared UI component styles extracted for reuse across games. */

/* App container layout */
.duckydoubles-app-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.duckydoubles-app-content {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Post-game name input */
.duckydoubles-postgame-name-input {
    width: 100%;
    max-width: 448px;
    margin: 16px auto 0;
    padding: 0;
    animation: duckydoubles-postgame-name-input-enter 300ms ease-out;
}

@keyframes duckydoubles-postgame-name-input-enter {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.duckydoubles-postgame-name-input--exit {
    animation: duckydoubles-postgame-name-input-exit 300ms ease-in forwards;
}

@keyframes duckydoubles-postgame-name-input-exit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

.duckydoubles-postgame-name-input__form {
    width: 100%;
}

.duckydoubles-postgame-name-input__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.duckydoubles-postgame-name-input__label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin: 0;
}

.duckydoubles-postgame-name-input__controls {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: stretch;
}

.duckydoubles-postgame-name-input__controls .duckydoubles-input {
    flex: 1;
    min-width: 0;
}

.duckydoubles-postgame-name-input__controls .duckydoubles-button {
    flex-shrink: 0;
    min-width: 80px;
}

.duckydoubles-postgame-name-input__error {
    font-size: 13px;
    color: #fca5a5;
    text-align: center;
    margin-top: 4px;
}

/* Post-game action bar */
.duckydoubles-postgame-actions {
    width: 100%;
    max-width: 448px;
    margin: 16px auto 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.duckydoubles-postgame-actions__buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .duckydoubles-postgame-actions__buttons {
        flex-direction: row;
    }
}

.duckydoubles-postgame-button {
    flex: 1 1 0%;
    width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    color: inherit;
    background: transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.duckydoubles-postgame-button--share {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.duckydoubles-postgame-button--share:hover {
    background: rgba(255, 255, 255, 0.3);
}

.duckydoubles-postgame-button--share:active {
    background: rgba(255, 255, 255, 0.4);
}

.duckydoubles-postgame-button--play {
    background: #facc15;
    color: #581c87;
}

.duckydoubles-postgame-button--play:hover {
    background: #fde047;
}

.duckydoubles-postgame-button--play:active {
    background: #fef08a;
}

.duckydoubles-postgame-feedback {
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* Cards */
.duckydoubles-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(9, 14, 24, 0.35);
}

.duckydoubles-card--muted {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
}

.duckydoubles-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.duckydoubles-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.duckydoubles-card-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.duckydoubles-card-value {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.duckydoubles-card-value--truncate {
    max-width: 60%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-align: right;
}

.duckydoubles-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    text-align: center;
    font-size: 12px;
}

.duckydoubles-card-grid-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.duckydoubles-card-grid-label {
    font-size: 10.4px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.duckydoubles-card-grid-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.duckydoubles-card-footer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.duckydoubles-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px;
}

.duckydoubles-card-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px;
}

.duckydoubles-card-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 16px;
}

.duckydoubles-card-text--center {
    text-align: center;
}

.duckydoubles-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.duckydoubles-card-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.duckydoubles-card-emphasis {
    font-size: 20px;
    font-weight: 700;
    color: #fde68a;
}

/* Info box */
.duckydoubles-info-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
}

.duckydoubles-info-box--center {
    text-align: center;
}

/* Buttons */
.duckydoubles-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.duckydoubles-button-group--compact {
    justify-content: center;
}

.duckydoubles-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6.4px;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

.duckydoubles-button--primary {
    background: #ffffff;
    color: #3b0764;
}

.duckydoubles-button--primary:hover:not(:disabled) {
    background: #f4f4f5;
}

.duckydoubles-button--primary:active:not(:disabled) {
    background: #e4e4e7;
    transform: scale(0.98);
}

.duckydoubles-button--primary:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
}

.duckydoubles-button--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.duckydoubles-button--secondary {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.duckydoubles-button--secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.28);
}

.duckydoubles-button--secondary:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0.98);
}

.duckydoubles-button--secondary:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.duckydoubles-button--secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.duckydoubles-button--ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.duckydoubles-button--ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
}

.duckydoubles-button--ghost:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.98);
}

.duckydoubles-button--ghost:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.duckydoubles-button--ghost:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.duckydoubles-button--highlight {
    background: #facc15;
    color: #3b0764;
}

.duckydoubles-button--highlight:hover:not(:disabled) {
    background: #fcd34d;
}

.duckydoubles-button--highlight:active:not(:disabled) {
    background: #fde047;
    transform: scale(0.98);
}

.duckydoubles-button--highlight:focus-visible {
    outline: 2px solid #facc15;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.3);
}

.duckydoubles-button--highlight:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.duckydoubles-button--outline {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.duckydoubles-button--outline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.32);
}

.duckydoubles-button--outline:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.98);
}

.duckydoubles-button--outline:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.duckydoubles-button--outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.duckydoubles-button--danger {
    background: #ef4444;
    color: #ffffff;
    border: none;
}

.duckydoubles-button--danger:hover:not(:disabled) {
    background: #dc2626;
}

.duckydoubles-button--danger:active:not(:disabled) {
    background: #b91c1c;
    transform: scale(0.98);
}

.duckydoubles-button--danger:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
}

.duckydoubles-button--danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.duckydoubles-button--inline,
.duckydoubles-button--small {
    font-size: 13px;
    padding: 6.4px 14.4px;
}

.duckydoubles-button--inline {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.duckydoubles-button--inline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.28);
}

.duckydoubles-button--inline:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0.98);
}

.duckydoubles-button--inline:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.duckydoubles-button--inline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.duckydoubles-button--small {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.duckydoubles-button--small:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.28);
}

.duckydoubles-button--small:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0.98);
}

.duckydoubles-button--small:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.duckydoubles-button--small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badges */
.duckydoubles-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .duckydoubles-badge-group {
        font-size: 14px;
    }
}

.duckydoubles-badge {
    display: inline-flex;
    align-items: center;
    gap: 5.6px;
    padding: 5.6px 13.6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
}

.duckydoubles-badge-strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

/* Pills */
.duckydoubles-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.duckydoubles-pill {
    display: inline-flex;
    align-items: center;
    gap: 4.8px;
    padding: 5.6px 13.6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 13px;
}

.duckydoubles-pill--status {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.92);
}

/* Form controls */
.duckydoubles-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.duckydoubles-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.duckydoubles-form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.duckydoubles-input,
.duckydoubles-textarea {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    font-size: 0.95rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.duckydoubles-input:hover:not(:disabled):not(:focus),
.duckydoubles-textarea:hover:not(:disabled):not(:focus) {
    border-color: #9ca3af;
}

.duckydoubles-input:focus,
.duckydoubles-textarea:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.duckydoubles-input:disabled,
.duckydoubles-textarea:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

.duckydoubles-input:invalid,
.duckydoubles-input--error,
.duckydoubles-textarea:invalid,
.duckydoubles-textarea--error {
    border-color: #ef4444;
}

.duckydoubles-input:invalid:focus,
.duckydoubles-input--error:focus,
.duckydoubles-textarea:invalid:focus,
.duckydoubles-textarea--error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.duckydoubles-input--uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.duckydoubles-textarea {
    resize: vertical;
    min-height: 96px;
}

.duckydoubles-form-helper {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.duckydoubles-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}
