/* WP Simple Guest Chat - controls.css */
/* Styles for specific controls like emoji picker, file/audio buttons, etc. */

/* General Buttons (these are shared across input area and some modals) */
.wsgc-chat-instance-wrapper .wsgc-send-message-btn, 
.wsgc-chat-instance-wrapper .wsgc-change-nickname-btn, 
.wsgc-chat-instance-wrapper .wsgc-logout-btn,    
.wsgc-chat-instance-wrapper .wsgc-emoji-toggle-btn,
.wsgc-chat-instance-wrapper .wsgc-file-upload-label, 
.wsgc-chat-instance-wrapper .wsgc-attachment-menu-toggle-btn, /* MODIFICATION: Add new button */
.wsgc-chat-instance-wrapper .wsgc-audio-record-btn {
    height: 40px; 
}

.wsgc-chat-instance-wrapper .wsgc-send-message-btn {
    padding: 10px 15px; 
    /* .wsgc-btn-primary class should provide background and color from dynamic styles */
}

/* Join Chat Prompt Button Styling */
.wsgc-chat-instance-wrapper .wsgc-join-chat-prompt-btn {
    /* Default appearance if primary color is not set or doesn't override */
    background-color: #0073aa; /* A common WordPress blue as a fallback */
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em; /* Slightly larger */
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block; /* Or block if it's meant to be full width and centered */
    margin: 20px auto; /* Center if it's a block/inline-block and container allows */
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wsgc-chat-instance-wrapper .wsgc-join-chat-prompt-btn:hover {
    background-color: #005a87; /* Darker shade of the fallback blue */
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.wsgc-chat-instance-wrapper .wsgc-join-chat-prompt-btn:active {
    background-color: #004a70; /* Even darker for active state */
    transform: translateY(0px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wsgc-chat-instance-wrapper .wsgc-change-nickname-btn {
    background-color: #d54e21;
    color: white; 
    font-size: 0.9em; padding: 6px 10px; height: auto; 
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 3px; /* Added for consistency */
    border: none; /* Added for consistency */
}
.wsgc-chat-instance-wrapper .wsgc-change-nickname-btn:hover { background-color: #b33611; }

.wsgc-chat-instance-wrapper .wsgc-logout-btn {
    background-color: #777;
    color: white; 
    font-size: 0.9em; padding: 6px 10px; height: auto; 
    margin-left: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 3px; /* Added for consistency */
    border: none; /* Added for consistency */
}
.wsgc-chat-instance-wrapper .wsgc-logout-btn:hover { background-color: #555; }


/* Icon-style buttons in input area */
.wsgc-chat-instance-wrapper .wsgc-emoji-toggle-btn,
.wsgc-chat-instance-wrapper .wsgc-file-upload-label,
.wsgc-chat-instance-wrapper .wsgc-attachment-menu-toggle-btn, /* MODIFICATION: Add new button */
.wsgc-chat-instance-wrapper .wsgc-audio-record-btn {
    background: none;
    border: 0px solid #ccc;
    color: #555;
    padding: 8px 10px; 
    font-size: 1.2em; 
    width: 40px; /* MODIFICATION: Set a fixed width */
    height: 40px; 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    box-sizing: border-box; 
    flex-shrink: 0; 
    border-radius: 3px;
}
.wsgc-chat-instance-wrapper .wsgc-emoji-toggle-btn:hover,
.wsgc-chat-instance-wrapper .wsgc-file-upload-label:hover:not(.disabled), 
.wsgc-chat-instance-wrapper .wsgc-attachment-menu-toggle-btn:hover, /* MODIFICATION: Add new button */
.wsgc-chat-instance-wrapper .wsgc-audio-record-btn:hover:not(.is-recording) {
    background-color: #f0f0f0;
}

/* REFINED: Increase font-size for the @ character to fill the button better */
.wsgc-chat-instance-wrapper .wsgc-attachment-menu-toggle-btn {
    font-size: 1.6em;
    font-weight: bold;
}

/* File Upload Specific */
.wsgc-chat-instance-wrapper .wsgc-file-upload-label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #eee; 
}
.wsgc-chat-instance-wrapper .wsgc-file-upload-label.disabled:hover {
    background-color: #eee; 
}
.wsgc-chat-instance-wrapper .wsgc-file-upload-input { 
    display: none;
}


/* Audio Record Button Specific */
.wsgc-chat-instance-wrapper .wsgc-audio-record-btn.is-recording {
    background-color: #ffdddd; /* A light red background */
    color: #d10000; /* A strong red for the icon */
    border-color: #ff8a8a;
    animation: wsgc-pulse-red 1.5s infinite; /* Add the pulsing animation */
}
.wsgc-chat-instance-wrapper .wsgc-audio-record-btn.is-recording:hover {
    background-color: #ffcccc; /* Slightly different red on hover */
}

@keyframes wsgc-pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(209, 0, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(209, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(209, 0, 0, 0);
    }
}

/* Emoji Picker */
.wsgc-chat-instance-wrapper .wsgc-emoji-picker {
    display: none; 
    flex-wrap: wrap;
    gap: 5px;
    border: 1px solid #ccc;
    background-color: #fff;
    padding: 10px;
    border-radius: 3px;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000; 
    position: absolute; 
    bottom: 100%; 
    left: 0;
    width: calc(100% - 2px); 
    box-sizing: border-box;
    margin-bottom: 5px;
}
.wsgc-chat-instance-wrapper .wsgc-input-area { 
    position: relative;
}

.wsgc-chat-instance-wrapper .wsgc-emoji-option {
    padding: 5px;
    cursor: pointer;
    font-size: 1.5em;
    border-radius: 3px;
    display: inline-block; 
    line-height: 1;
}
.wsgc-chat-instance-wrapper .wsgc-emoji-option:hover {
    background-color: #e0e0e0;
}
.wsgc-chat-instance-wrapper .wsgc-message-entry .wsgc-text img.emoji {
    height: 1.2em;
    width: 1.2em;
    margin: 0 .05em 0 .1em;
    vertical-align: -0.2em; 
}

/* REFINED: Styles for the attachment selector */
.wsgc-chat-instance-wrapper .wsgc-attachment-selector {
    display: none;
    flex-direction: column;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    position: absolute;
    bottom: 100%;
    left: 0;
    min-width: 150px;
    box-sizing: border-box;
    margin-bottom: 5px;
    padding: 5px;
}

.wsgc-chat-instance-wrapper .wsgc-attachment-option {
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    border-radius: 3px;
    color: #333;
    /* REFINED: Add flex properties for alignment */
    display: flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
}

.wsgc-chat-instance-wrapper .wsgc-attachment-option:hover {
    background-color: #f0f0f0;
}

/* Private Chat Dialog (jQuery UI Dialog) - specific button */
.wsgc-private-chat-dialog .wsgc-private-send-btn {
    padding: 8px 12px;
    background-color: #006ba1; 
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    height: 38px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wsgc-private-chat-dialog .wsgc-private-send-btn:hover {
    background-color: #005a87;
}
.wsgc-private-chat-dialog .wsgc-private-send-btn:disabled {
    background-color: #b0c4de;
    cursor: not-allowed;
}