/* Reset and base styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f9f9f9;
}

#text-connect {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h2,
h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Form styling */
.form-section {
    margin-bottom: 20px;
}

.field-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

label {
    font-weight: bold;
    min-width: 120px;
    color: #34495e;
}

select,
input,
textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    max-width: 280px;
    transition: border-color 0.3s;
}

select:focus,
input:focus,
textarea:focus {
    border-color: #3498db;
    outline: none;
}

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

/* Carbon Copy Section */
.cc-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
}

.cc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    transition: background 0.3s, border-color 0.3s;
}

.cc-item:hover {
    background: #f1f5f9;
    border-color: #c0c0c0;
}

.cc-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #666;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.cc-checkbox:checked {
    background: #3498db;
    border-color: #3498db;
}

.cc-checkbox:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
}

.cc-name {
    font-weight: 500;
    color: #2c3e50;
}

.cc-phone {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Variables Container */
.variables-container {
    display: flex;
    gap: 10px;
}

.variable-insert {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #3498db;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.variable-insert:hover {
    background: #3498db;
    color: #fff;
}

/* Phone Screen and Message Bubble */
.phone-screen {
    width: 280px;
    height: 240px;
    /* Reduced to half of 480px */
    border: 1px solid #ccc;
    border-radius: 12px;
    overflow: auto;
    padding: 15px;
    background: #f4f4f4;
    margin: 0 auto;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.message-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 10px 10px 10px 0;
    background: #e0f7fa;
    color: #333;
    margin: 10px 0;
    font-size: 14px;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Contact List */
.contact-list {
    margin-top: 20px;
}

.contact-list ul {
    list-style: none;
    padding: 0;
}

.contact-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.contact-name {
    font-weight: bold;
    color: #34495e;
    flex: 1;
}

.contact-phone {
    color: #7f8c8d;
    flex: 1;
    text-align: center;
}

.send-sms-btn {
    padding: 8px 16px;
    margin: 0;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.send-sms-btn:hover {
    background: #2980b9;
}

.send-sms-btn:active {
    background: #1f6b9c;
}

/* Responsive Design */
@media (max-width: 480px) {
    #text-connect {
        margin: 10px;
        padding: 10px;
    }

    .field-group {
        flex-direction: column;
        align-items: stretch;
    }

    label {
        min-width: 100%;
        margin-bottom: 5px;
    }

    .cc-list {
        flex-direction: column;
        gap: 10px;
    }

    .cc-item {
        width: 100%;
        box-sizing: border-box;
    }

    .variables-container {
        flex-direction: column;
        gap: 5px;
    }

    .variable-insert {
        width: 100%;
        box-sizing: border-box;
    }

    .phone-screen {
        width: 100%;
        height: 150px;
        /* Reduced to half of 300px for mobile */
    }

    .contact-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .contact-name,
    .contact-phone {
        text-align: left;
        flex: none;
    }

    .send-sms-btn {
        width: 100%;
        text-align: center;
    }
}
/* Login Form Styling */
#text-connect-login p {
    margin-bottom: 15px;
}

#text-connect-login label {
    display: block;
    font-weight: bold;
    color: #34495e;
    margin-bottom: 5px;
}

#text-connect-login input[type="text"],
#text-connect-login input[type="password"] {
    width: 100%;
    max-width: 280px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

#text-connect-login input[type="text"]:focus,
#text-connect-login input[type="password"]:focus {
    border-color: #3498db;
    outline: none;
}

#text-connect-login input[type="checkbox"] {
    margin-right: 5px;
}

#text-connect-login input[type="submit"] {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

#text-connect-login input[type="submit"]:hover {
    background: #2980b9;
}

#text-connect-login input[type="submit"]:active {
    background: #1f6b9c;
}

#text-connect-login p a {
    color: #3498db;
    text-decoration: none;
}

#text-connect-login p a:hover {
    text-decoration: underline;
}