/* Updated phone.css with smaller modal size and red timer background */

/* Call Request Form Modal Styles */

.form-submission-message {
    margin: 15px 0;
    transition: all 0.3s ease;
}

.form-submission-message .alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 0;
}

.form-submission-message .alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-submission-message .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-container {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    height: auto; /* Set height to auto to expand based on content */
    padding: 20px;
    box-shadow: 0 4px 20px #e50809;
    position: relative; /* Required for absolute positioning of close button */
    overflow-y: auto;
}


#callRequestModal .container-modal-header {
  background-color: #e50809;
  color: white;
  border-radius: 10px 10px 0 0;
  padding: 15px 20px;
  width: 95%;
  margin-top: 10px;
}

#callRequestModal .container-modal-title {
  font-weight: 600;
  text-align: center;
  color: white;
  padding-top:10px;
}

#callRequestModal .container-close {
    position: absolute; /* Absolute positioning inside .phone-container */
    top: 5px;
    right: 12px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
    color: black;
}

#callRequestModal .container-modal-body {
  padding: 20px;
  width: 95%;
}

#callRequestModal .container-form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

#callRequestModal .container-form-group label {
  display: flex;
  align-items: center;
  font-weight: 500;
  margin-bottom: 5px;
  gap: 4px; /* Space between Label and * */
}

#callRequestModal .container-text-danger {
  color: #e50809;
  font-size: 0.9rem;
  position: relative;
}

#callRequestModal .container-form-control {
  width: 100%;
  border-radius: 5px;
  border: 1px solid #ddd;
  padding: 10px 15px !important;
  box-sizing: border-box;
}

#callRequestModal .container-call-section {
    display: flex;
    justify-content: center;
}

#callRequestModal .container-call-btn {
    background: #e50809;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.country-code-select {
    width: 100px;
    margin-right: 10px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.phone-input-container {
    display: flex;
    width: 100%;
}

.phone-input {
    flex: 1;
}

.field-text-danger {
  color: #e50809;
  font-size: 0.9rem;
  position: relative;
  top: 5px;
}

.call-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background-color: rgb(0 0 0 / 88%);
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.call-close {
    position: absolute; /* Absolute positioning inside .phone-container */
    top: 10px;
    right: 12px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
    color: black;
}

.phone-container {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 280px;
    height: 320px;
    padding: 20px;
    box-shadow: 0 4px 20px #e50809;
    position: relative; /* Required for absolute positioning of close button */
}

.header {
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.01em;
    margin: 0;
    padding: 10px;
    color: #343a40; /* Dark text color for better visibility */
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.status-bar {
    display: block;
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    margin-top: 20px;
}

#statusText {
    display: block;
    text-align: right;
    font-size: 1.2rem;
    color: #343a40;
    margin-top: 45px;
    margin-bottom: 10px;
    width: 100%;
    font-weight: 700;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.01em;
}

.call-interface {
    display: flex;
    flex-direction: column;
    height: 90%;
    padding: 10px 4px 0 4px;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
}

.caller-info {
    text-align: center;
    margin-bottom: 20px;
}

#callerName {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
}

#callerNumber {
    font-size: 1rem;
    color: #666;
    margin-top: 5px;
    display: none;
}

#callTimer {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #343a40;
}

.main-call-section {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.main-call-btn, .main-end-call-btn {
    background: #e50809;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.main-call-btn:hover {
    background: #c40707;
    transform: translateY(-2px);
}

.main-end-call-btn {
    background: #e50809;
    display: none;
}

.main-end-call-btn:hover {
    background: #a91f2b;
    transform: translateY(-2px);
}

.call-controls {
    display: flex;
    justify-content: center; /* Distribute evenly */
    gap: 15px; /* Space between each button */
    margin-top: 15px;
    width: 100%; /* Ensures the row stretches across the container */
}

.control-btn {
    width: 60px;
    height: 60px;
    background: white;
    color: black;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s;
    padding: 0;
}

.control-btn:hover {
    background: #f0f0f0;
}

.control-btn.active {
    background: #e50809;
    color: white;
    border-color: #e50809;
}

.control-btn i {
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .phone-container {
        width: 95%;
        padding: 15px;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .main-call-btn, .main-end-call-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .control-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-dot.connected { background: #28a745; }
.status-dot.connecting { background: #ffc107; }
.status-dot.disconnected { background: #dc3545; }

.disabled-btn {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed !important;
}

#endCallBtn {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: pointer;
}

#endCallBtn[disabled] {
    pointer-events: none !important;
    opacity: 0.5 !important;
}
