* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.header {
    background: #2563eb;
    color: white;
    padding: 20px;
    text-align: center;
}

.header h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s infinite;
}

.status-dot.ready {
    background: #4ade80;
}

.status-dot.initializing {
    background: #fbbf24;
}

.status-dot.error {
    background: #ef4444;
}

.status-dot.offline {
    background: #9ca3af;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.content {
    padding: 20px;
}

.contact-info {
    background: #f9fafb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.contact-name {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.contact-phone-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-phone {
    font-size: 16px;
    color: #6b7280;
    font-family: 'Courier New', monospace;
}

.phone-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
}

.country-selector {
    margin-bottom: 20px;
    position: relative;
}

.country-selector label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.country-selector select {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10L6 9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    transition: all 0.2s ease;
    color: #111827;
    font-weight: 500;
}

.country-selector select:hover {
    border-color: #2563eb;
    background-color: #f9fafb;
}

.country-selector select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: white;
}

.country-selector select:active {
    border-color: #1d4ed8;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.call-controls-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    align-items: stretch;
    width: 100%;
    justify-content: space-between;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Перекриваємо будь-які інші стилі для кнопки Call */
#callButton.btn-call,
button#callButton.btn-call,
.btn.btn-call#callButton {
    background: #22c55e !important;
    background-color: #22c55e !important;
    color: white !important;
    flex: 1;
    min-width: 0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-call {
    background: #22c55e !important;
    background-color: #22c55e !important;
    color: white !important;
    flex: 1;
    min-width: 0;
}

.btn-call:hover:not(:disabled) {
    background: #16a34a !important;
    background-color: #16a34a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-hangup {
    background: #ef4444 !important;
    background-color: #ef4444 !important;
    color: white !important;
    flex: 1;
    min-width: 0;
}

.btn-hangup:hover:not(:disabled) {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-mute {
    background: #6b7280 !important;
    background-color: #6b7280 !important;
    color: white !important;
    min-width: 50px;
    max-width: 50px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-mute:hover:not(:disabled) {
    background: #4b5563 !important;
    background-color: #4b5563 !important;
}

.btn-edit {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-edit:hover:not(:disabled) {
    background: #e5e7eb;
}

.btn-icon {
    font-size: 18px;
}

.call-info {
    margin-top: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    text-align: center;
}

.call-duration {
    font-size: 32px;
    font-weight: 600;
    color: #111827;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
}

.call-status {
    font-size: 14px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 480px) {
    .widget {
        border-radius: 0;
        max-width: 100%;
}

    .header {
        padding: 15px;
    }
    
    .content {
        padding: 15px;
    }
}
