/* SOAK Contact Widget Styles */

#soak-contact-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Minimized Widget */
.soak-widget-minimized {
    width: auto;
    min-width: 120px;
    height: 50px;
    background-color: #617D88;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    padding: 0 15px;
    gap: 8px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.soak-widget-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.soak-widget-minimized:hover {
    background-color: #95BDC7;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(255, 255, 255, 1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(255, 255, 255, 0.9);
    }
    50% {
        box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(255, 255, 255, 1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(255, 255, 255, 0.9);
    }
}

/* Expanded Widget */
.soak-widget-expanded {
    display: none;
    width: 400px;
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    overflow-y: auto;
    animation: slideInUp 0.4s ease-out;
    position: absolute;
    bottom: 70px;
    right: 0;
    top: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.soak-widget-expanded.show {
    display: block;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Widget Header */
.soak-widget-header {
    background-color: #617D88;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.soak-widget-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-align: center;
}

.soak-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.soak-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Language flags - moved to content area */
.soak-language-flags {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-top: 10px;
}

.soak-lang-flag {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #617D88;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    opacity: 0.7;
}

.soak-lang-flag:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.soak-lang-flag.active {
    opacity: 1;
    background: #617D88;
    color: white;
    border-color: #617D88;
}

.soak-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.soak-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Widget Content */
.soak-widget-content {
    padding: 25px;
}

/* Team Section with Logo */
.soak-team-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 15px 0;
}

/* Team Members */
.soak-team-members {
    display: flex;
    align-items: center;
    position: relative;
}

.soak-team-member {
    text-align: center;
    position: relative;
    margin-right: -15px; /* Creates overlapping effect */
}

.soak-team-member:last-child {
    margin-right: 0;
}

.soak-team-member img {
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, z-index 0.2s ease;
    position: relative;
    z-index: 1;
}

.soak-team-member-small img {
    width: 60px;
    height: 60px;
}

.soak-team-member-large img {
    width: 75px;
    height: 75px;
}

.soak-team-member:hover img {
    transform: scale(1.15);
    z-index: 10;
    border-color: #95BDC7;
}

.soak-team-member span {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #617D88;
    margin-top: 5px;
    white-space: nowrap;
}

/* SOAK Logo */
.soak-logo {
    margin-left: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.soak-logo img {
    height: 25px;
    width: auto;
    opacity: 0.8;
}

/* Description */
.soak-description {
    text-align: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.soak-description p {
    color: #617D88;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Contact Form */
.soak-contact-form {
    display: block;
}

.soak-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.soak-input-group {
    position: relative;
    flex: 1;
    margin-bottom: 15px;
}

.soak-input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #f8f9fa;
    outline: none;
}

.soak-input-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #f8f9fa;
    outline: none;
    resize: none;
    min-height: 70px;
    font-family: inherit;
}

.soak-input-group input:focus,
.soak-input-group textarea:focus {
    border-color: #617D88;
    background: white;
    box-shadow: 0 0 0 3px rgba(97, 125, 136, 0.1);
}

.soak-input-group input:valid:not(:placeholder-shown),
.soak-input-group textarea:valid:not(:placeholder-shown) {
    border-color: #95BDC7;
    background: white;
}

.soak-input-group input::placeholder,
.soak-input-group textarea::placeholder {
    color: #999;
    font-size: 14px;
}

.soak-phone-info {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #95BDC7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.soak-phone-info p {
    margin: 0;
    font-size: 14px;
    color: #617D88;
    font-weight: 500;
}

.soak-phone-info a {
    color: #617D88;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.soak-phone-info a:hover {
    color: #95BDC7;
}

.soak-submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #617D88;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 20px 0 15px 0;
}

.soak-submit-btn:hover {
    background-color: #95BDC7;
}

.soak-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.soak-privacy-notice {
    text-align: center;
    padding-bottom: 10px;
}

.soak-privacy-notice small {
    color: #666;
    font-size: 12px;
}

.soak-privacy-notice a {
    color: #617D88;
    text-decoration: none;
}

.soak-privacy-notice a:hover {
    text-decoration: underline;
}

/* Success Message */
.soak-success-message {
    text-align: center;
    padding: 30px 20px;
}

.soak-thumbs-up {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(.9, .9, .9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(.97, .97, .97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

.soak-success-message h4 {
    color: #617D88;
    margin: 0 0 10px 0;
    font-size: 20px;
}

.soak-success-message p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* Mobile Responsiveness */

/* Tablet - compact like mobile but slightly more room */
@media (max-width: 1024px) and (min-width: 601px) {
    #soak-contact-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .soak-widget-expanded {
        position: fixed !important;
        width: 360px !important;
        max-width: calc(100vw - 30px);
        max-height: calc(100vh - 90px) !important;
        max-height: calc(100dvh - 90px) !important;
        bottom: 65px !important;
        right: 15px !important;
        left: auto !important;
        top: auto !important;
        border-radius: 16px;
        overflow: hidden !important;
        overflow-y: auto !important;
    }
    
    .soak-widget-content {
        padding: 18px;
    }
    
    .soak-widget-header {
        padding: 14px 18px;
        border-radius: 16px 16px 0 0;
    }
    
    .soak-widget-header h3 {
        font-size: 16px;
    }
    
    .soak-close-btn {
        right: 16px;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
    
    /* Hide team section on tablet */
    .soak-team-section {
        display: none;
    }
    
    /* Hide description on tablet */
    .soak-description {
        display: none;
    }
    
    /* Hide language flags on tablet */
    .soak-language-flags {
        display: none;
    }
    
    .soak-form-row {
        display: flex;
        flex-direction: row;
        gap: 12px;
        margin-bottom: 0;
    }
    
    .soak-form-row .soak-input-group {
        flex: 1;
        margin-bottom: 12px;
    }
    
    .soak-input-group {
        margin-bottom: 12px;
    }
    
    .soak-input-group input {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 12px;
        background: #f5f7f8;
        border: 1px solid transparent;
    }
    
    .soak-input-group input:focus {
        background: white;
        border-color: #617D88;
    }
    
    .soak-input-group textarea {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 12px;
        background: #f5f7f8;
        border: 1px solid transparent;
        min-height: 60px;
    }
    
    .soak-input-group textarea:focus {
        background: white;
        border-color: #617D88;
    }
    
    .soak-phone-info {
        margin: 14px 0;
        padding: 12px 16px;
        border-radius: 12px;
        background: linear-gradient(135deg, #f5f7f8 0%, #e9ecef 100%);
        border-left: 4px solid #617D88;
    }
    
    .soak-phone-info p {
        font-size: 14px;
    }
    
    .soak-phone-info a {
        font-size: 16px;
        font-weight: 600;
    }
    
    .soak-submit-btn {
        padding: 15px;
        font-size: 15px;
        font-weight: 600;
        margin: 14px 0 10px 0;
        border-radius: 12px;
    }
    
    .soak-privacy-notice {
        padding-bottom: 0;
        text-align: center;
    }
    
    .soak-privacy-notice small {
        font-size: 11px;
        color: #888;
    }
    
    .soak-success-message {
        padding: 30px 20px;
    }
    
    .soak-thumbs-up {
        font-size: 48px;
    }
    
    .soak-success-message h4 {
        font-size: 18px;
    }
    
    .soak-success-message p {
        font-size: 14px;
    }
}

/* Mobile - compact form only */
@media (max-width: 600px) {
    #soak-contact-widget {
        bottom: 12px;
        right: 12px;
        left: auto;
    }
    
    .soak-widget-minimized {
        width: auto;
        min-width: 90px;
        height: 42px;
        padding: 0 12px;
        gap: 6px;
    }
    
    .soak-widget-text {
        font-size: 12px;
    }
    
    .soak-widget-expanded {
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 60px !important;
        top: auto !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100vh - 80px) !important;
        max-height: calc(100dvh - 80px) !important;
        border-radius: 16px;
        overflow: hidden !important;
        overflow-y: auto !important;
    }
    
    .soak-widget-content {
        padding: 16px;
    }
    
    .soak-widget-header {
        padding: 14px 16px;
        border-radius: 16px 16px 0 0;
    }
    
    .soak-widget-header h3 {
        font-size: 16px;
    }
    
    .soak-close-btn {
        right: 14px;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
    
    /* Hide team section on mobile */
    .soak-team-section {
        display: none;
    }
    
    /* Hide description on mobile */
    .soak-description {
        display: none;
    }
    
    /* Hide language flags on mobile - keep it simple */
    .soak-language-flags {
        display: none;
    }
    
    .soak-form-row {
        display: flex;
        flex-direction: row;
        gap: 10px;
        margin-bottom: 0;
    }
    
    .soak-form-row .soak-input-group {
        flex: 1;
        margin-bottom: 10px;
    }
    
    .soak-input-group {
        margin-bottom: 10px;
    }
    
    .soak-input-group input {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
        background: #f5f7f8;
        border: 1px solid transparent;
    }
    
    .soak-input-group input:focus {
        background: white;
        border-color: #617D88;
    }
    
    .soak-input-group textarea {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
        background: #f5f7f8;
        border: 1px solid transparent;
        min-height: 60px;
    }
    
    .soak-input-group textarea:focus {
        background: white;
        border-color: #617D88;
    }
    
    .soak-phone-info {
        margin: 12px 0;
        padding: 12px 16px;
        border-radius: 12px;
        background: linear-gradient(135deg, #f5f7f8 0%, #e9ecef 100%);
        border-left: 4px solid #617D88;
    }
    
    .soak-phone-info p {
        font-size: 14px;
    }
    
    .soak-phone-info a {
        font-size: 16px;
        font-weight: 600;
    }
    
    .soak-submit-btn {
        padding: 16px;
        font-size: 16px;
        font-weight: 600;
        margin: 12px 0 10px 0;
        border-radius: 12px;
    }
    
    .soak-privacy-notice {
        padding-bottom: 0;
        text-align: center;
    }
    
    .soak-privacy-notice small {
        font-size: 11px;
        color: #888;
    }
    
    .soak-success-message {
        padding: 30px 20px;
    }
    
    .soak-thumbs-up {
        font-size: 48px;
    }
    
    .soak-success-message h4 {
        font-size: 18px;
    }
    
    .soak-success-message p {
        font-size: 14px;
    }
}

/* Small mobile tweaks */
@media (max-width: 380px) {
    .soak-widget-expanded {
        left: 8px !important;
        right: 8px !important;
        bottom: 55px !important;
    }
    
    .soak-widget-content {
        padding: 14px;
    }
    
    .soak-widget-header {
        padding: 12px 14px;
    }
    
    .soak-widget-header h3 {
        font-size: 15px;
    }
    
    .soak-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .soak-input-group input,
    .soak-input-group textarea {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .soak-input-group {
        margin-bottom: 8px;
    }
    
    .soak-phone-info {
        padding: 10px 12px;
        margin: 10px 0;
    }
    
    .soak-submit-btn {
        padding: 14px;
        font-size: 15px;
        margin: 10px 0 8px 0;
    }
    
    .soak-privacy-notice small {
        font-size: 10px;
    }
}

/* Loading state */
.soak-submit-btn.loading {
    position: relative;
    color: transparent;
}

.soak-submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
