@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext');

/* Reset
------------------------------------------------------------------------------*/

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
	display: block;
}

body {
	line-height: 1;
    background: #000;
}

ol, ul {
	list-style: none;
	padding: 0px;
	margin: 0px;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* Default Styles
------------------------------------------------------------------------------*/

strong { font-weight: bold; }
em { font-style: italic; }
del { text-decoration: line-through; }
th, td { vertical-align: middle; }
th { font-weight: normal; text-align: left; }
address, cite, dfn { font-style: normal; }
abbr, acronym { border-bottom: 1px dotted #999; cursor: help; }
select, input, textarea, button { font: 99% Arial; }
button, input, select, textarea { margin: 0; }
textarea { overflow: auto; }
sub, sup { font-size: 75%; line-height: 0; position: relative; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 15px; }
label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
a:hover, a:active { outline: none; }
a, a:active, a:visited { text-decoration: none; }
a img {vertical-align: top;}

p a,
p a:active { color: #fd9f1b; text-decoration: underline;}

p a:hover { color: #37939B; text-decoration: underline}

::-moz-selection{ background: #1395a1; color:#fff; text-shadow: none; }
::selection { background:#1395a1; color:#fff; text-shadow: none; }
a:link { -webkit-tap-highlight-color: #1395a1; }
button {  width: auto; overflow: visible; }

.none { display: none;}
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
.invisible { visibility: hidden; }
.unselectable {	-webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; }
.left {float: left !important;}
.right {float: right !important; }
.clear { clear: both;}
.text_right {text-align: right;}
.text_left {text-align: left;}
.text_center {text-align: center;}
.nobrd {border: none  !important}
.mgrbottom {margin-bottom: 10px !important;}

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

.clearfix {
    *zoom: 1;
}

/* Main style
--------------------------------------*/

html, body {
	height: 100%;
}

body {
	font-size: 13px;
	line-height: 18px;
	padding: 0;
	margin: 0;
	color: #6b4536;
	font-family: 'Open Sans', sans-serif;
	overflow-y: hidden;
	overflow-x: hidden;
	background: #d3e0ff url(img/bg.jpg) no-repeat center top;
	background-size: cover;
	display: flex;
	justify-content: center;
	align-items: center;
	position: fixed; /* Add this line */
	width: 100%; /* Add this line */
	height: 100%; /* Add this line */
}

body * {
	box-shadow: none !important;
}

/* Chat */

.chat-container {
	background: white;
	border-radius: 0px;
	box-shadow: 0px 8px 35px -29px rgba(66, 68, 90, 1);
	overflow: hidden;
	width: 100%;
	height: calc(100% - 20px); /* Adjust height to account for the status bar */
	max-width: 100%;
	max-height: calc(100% - 20px); /* Adjust height to account for the status bar */
	display: flex;
	flex-direction: column;
	margin-top: 0; /* Remove margin */
	position: fixed;
	top: 20px; /* Position below the status bar */
	bottom: 20px; /* Adjust bottom position */
	left: 0;
	right: 0;
}

.chat-header {
	background: #fff;
	color: #000;
	padding: 10px;
	text-align: center;
	display: flex;
	justify-content: space-between;
	align-items: center;
    font-size: 22px;
    font-weight: bold;
    border-bottom: 1px solid #ccc;}

.chat-header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-left: 5px;
    margin-right: 5px;
}

.icons-contact {
    margin-right: 15px;
    color: #6c757d;
    font-size: 18px;
}

.icons-contact .bi {
    margin-left: 5px;
}


.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #d3e0ff;
    display: flex;
    flex-direction: column; /* Ensure normal column direction */
    justify-content: flex-end; /* Ensure messages are at the bottom */
}

.chat-footer {
    background-color: #fff;
    padding: 10px;
	display: flex;
	align-items: center;
	border-top: 1px solid #ccc; /* Add line above the textarea, icons, and button */
    flex-shrink: 0; /* Ensure footer does not shrink */
}

.chat-footer input {
	flex: 1;
	margin-right: 10px;
	resize: vertical; /* Allow vertical resizing */
}

.chat-footer .btn {
	background: #0093d8;
	color: white;
}

.chat-footer textarea {
    flex: 1;
    margin-right: 10px;
    resize: none; /* Hide resize icon */
    border: none; /* Remove border */
    outline: none; /* Remove outline */
    box-shadow: none; /* Remove box shadow */
}

.chat-footer p {
    flex: 1;
    margin-right: 10px;
    resize: none; /* Hide resize icon */
    border: none; /* Remove border */
    outline: none; /* Remove outline */
    box-shadow: none; /* Remove box shadow */
    min-height: 70px;
    font-size: 14px;
    overflow: auto; /* Allow scrolling if content overflows */
}

/* Attachment indicator bar directly above the footer */
#attachment-indicator {
    background: linear-gradient(180deg, #f8f9fb, #eef3ff); /* subtle contrast */
    border-top: 1px solid #d0d7e9;
    border-bottom: 1px solid #d0d7e9;
    padding: 10px 12px;
    gap: 8px;
    align-items: center;
}

#attachment-indicator .attachment-text {
    font-size: 14px;
    color: #23304a;
}

#attachment-indicator .attachment-actions .btn {
    font-size: 13px;
    padding: 0 6px;
}

.chat-bubble {
	padding: 13px;
	border-radius: 20px;
	margin-bottom: 30px;
    font-size: 16px;
    font-weight: bold;
	max-width: 80%;
	animation: popup 0.3s ease-in-out;
	display: flex;
	flex-direction: column; /* Stack content vertically */
	align-items: flex-start; /* Align content to the left */
	position: relative;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3); /* Add slight shadow */
}

.chat-bubble.left {
	background-color: #fff;
	align-self: flex-start;
	margin-left: 80px; /* Add margin to make space for the avatar */
    border-radius: 20px 20px 20px 0px;
    color: #000;
}

.chat-bubble.right {
	background-color: #248bf5;
	color: white;
	align-self: flex-end;
	margin-right: 80px; /* Add margin to make space for the avatar */
    border-radius: 20px 20px 0px 20px;
}

.avatar {
	position: absolute;
    margin-bottom: 20px;
    bottom: -25px;
	left: -70px; /* Position the avatar outside the chat bubble */
	width: 60px; /* Make avatar 2x bigger */
	height: 60px; /* Make avatar 2x bigger */
	border-radius: 50%;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); /* Add shadow */
}

#message_type {
    min-height: 70px;
    font-size: 14px;;
}

.avatar.right {
	left: auto;
	right: -70px; /* Position the avatar outside the chat bubble */
}

.status-indicator {
	position: absolute;
	width: 12px;
	height: 12px;
	background-color: green;
	border-radius: 50%;
	border: 2px solid white;
	bottom: 0;
	right: 0;
}

.chat-bubble .name {
	margin-top: 5px;
	font-size: 12px;
	color: #888;
	position: absolute;
	bottom: -20px;
	left: 0;
	right: 0;
	text-align: left;
}

.chat-bubble.right .name {
    text-align: right;
}

@keyframes popup {
	0% {
		transform: scale(0.5);
		opacity: 0;
	}
	50% {
		transform: scale(1.1);
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

/* Status Bar */

.status-bar {
    height: 20px;
    font-size: 12px;
    position: fixed; /* Change to fixed to always be visible */
    top: 0;
    width: 100%;
    z-index: 2000; /* Ensure it is above other elements */
}

.status-bar .time {
    font-weight: bold;
}

/* Contact List */

.contact-list {
    width: 100%;
    height: calc(100% - 20px); /* Adjust height to account for the status bar */
    margin: 0; /* Remove margin */
    background: white;
    box-shadow: 0px 8px 35px -29px rgba(66, 68, 90, 1);
    overflow: hidden;
    position: absolute;
    top: 20px; /* Position below the status bar */
    display: flex;
    flex-direction: column;
    color: #000;
}

.contact-list-header {
    background-color: #007bff; /* Bootstrap primary color */
    color: white;
    font-size: 20px;
    padding: 20px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-list .list-group {
    flex: 1;
    overflow-y: auto; /* Enable vertical scrolling */
}

.contact-list .list-group-item {
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.contact-list .list-group-item:hover {
    background-color: #f0f0f0;
}

/* Incoming Call Screen */

.incoming-call-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50, #4b79a1, #2c3e50); /* Dark three-color gradient */
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.incoming-call-header {
    width: 100%;
    padding: 10px;
    text-align: center;
    color: white; /* White text */
}

.incoming-call-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.caller-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    position: absolute !important;
    top: 25%;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.1);
    animation: calling 2s ease-in-out infinite;
}

@keyframes calling {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
        transform: translateY(-50%) scale(1);
    }
    50% {
        box-shadow: 0 0 0 40px rgba(255, 255, 255, 0); /* Increased from 20px to 40px */
        transform: translateY(-50%) scale(1.1); /* Increased from 1.05 to 1.1 */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        transform: translateY(-50%) scale(1);
    }
}

.caller-info h4 {
    margin: 20px 0 10px 0; /* Increase bottom margin */
    font-size: 28px; /* Make the caller name bigger */
    color: white; /* White text */
}

.caller-info p {
    margin: 0;
    font-size: 18px;
    color: #ccc; /* Light gray text */
}

.call-actions {
    position: absolute !important;
    bottom: 100px; /* Position 100px from the bottom */
    display: flex !important;
    justify-content: center !important; /* Center the icons */
    width: 100% !important;
}

.call-actions i {
    cursor: pointer;
    font-size: 3rem; /* Make icons much bigger */
    margin: 0 40px; /* Add more space between icons */
    color: white; /* Make icons white */
    transition: all 0.3s ease;
}

.call-actions .answer {
    background-color: green;
    border-radius: 50%;
    padding: 20px;
    animation: wiggle 1s ease-in-out infinite;
}

.call-actions .cancel {
    background-color: red;
    border-radius: 50%;
    padding: 20px;
    animation: wiggle 1s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

/* Lock Screen */

.lock-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #17212a, #265a87, #122a43, #0d0a1f); /* Dark three-color gradient */
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure lock screen is on top */
}

.lock-screen-time {
    color: white;
    font-size: 48px;
    margin-bottom: 20px;
}

.lock-screen-message-container {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 80%; /* Make the container 80% width */
    position: absolute;
    top: 25%; /* Position the container 50% higher */
    transform: translateY(-50%);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 1); /* Add shadow */
}

.lock-screen-message {
    position: relative;
    color: white;
    font-size: 30px;
    display: flex;
    top: -50px;
    align-items: center;
    margin-bottom: -30px; /* Reduce space between message and preview */
}

.lock-screen-message i {
    font-size: 90px; /* Make the icon much bigger */
}

.lock-screen-message .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 5px 10px;
    font-size: 20px;
}

.lock-screen-message-preview {
    color: white;
    font-size: 18px;
    text-align: center;
    margin-bottom: 20px;
    line-height: 22px;
}

.lock-screen-unlock {
    position: absolute;
    bottom: 50px; /* Position the lock icon at the bottom */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.lock-screen-unlock i {
    color: white;
    font-size: 24px;
}

/* Home Screen */

.home-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50, #4b79a1, #2c3e50); /* Dark three-color gradient */
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    z-index: 1000; /* Ensure home screen is on top */
}

.dock {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0px -4px 6px rgba(0, 0, 0, 0.3); /* Add shadow */
}

.dock-icon {
    color: white;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.dock-icon:nth-child(1) {
    background-color: #28a745; /* Green for phone */
}

.dock-icon:nth-child(2) {
    background-color: #007bff; /* Blue for messages */
}

.dock-icon:nth-child(3) {
    background-color: #ffc107; /* Yellow for www */
}

.dock-icon:nth-child(4) {
    background-color: #dc3545; /* Red for camera */
}

.dock-icon:nth-child(5) {
    background-color: #6c757d; /* Gray for settings */
}

.dock-icon:nth-child(6) {
    background-color: #17a2b8; /* Teal for address book */
}

/* Web Browser Screen */

.web-browser-screen {
    width: 100%;
    height: calc(100% - 20px); /* Adjust height to account for the status bar */
    background: white;
    position: absolute;
    top: 20px; /* Position below the status bar */
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000; /* Ensure web browser screen is on top */
}

.browser-header {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 5px; /* Reduce padding to make the header smaller */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Add shadow */
}

.browser-header i {
    font-size: 1.5rem;
    cursor: pointer;
}

.browser-header input {
    flex: 1;
    margin-left: 10px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.browser-body {
    justify-content: center;
    align-items: center;
    padding: 0; /* Remove padding */
}

.browser-body img {
    width: 100%; /* Make image full width */
    height: auto; /* Maintain aspect ratio */
    border: none; /* Remove border */
    border-radius: 0; /* Remove border radius */
}

/* Image Captions */

.chat-image {
    max-width: 150px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}

.image-caption {
    font-size: 16px; /* Same size as regular messages */
    font-weight: bold; /* Same weight as regular messages */
    line-height: 1.4;
    padding-top: 10px;
    width: 100%; /* Full width of bubble */
}

.chat-bubble.right .image-caption {
    color: #fff; /* White text for right bubble captions */
}

.chat-bubble.left .image-caption {
    color: #000; /* Black text for left bubble captions */
}

/* Voice Message */

.voice-message {
    display: flex;
    align-items: center;
    gap: 5px; /* Reduced from 10px to 5px */
}

.voice-message i {
    font-size: 1.2rem;
    margin-right: 5px; /* Add small right margin to icon */
}

.voice-wave {
    width: 40px; /* Reduced from 100px to 40px */
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin-right: 5px; /* Add small right margin to wave */
}

/* Chat Header Avatar */

.chat-header-avatar.bi {
    font-size: 50px;
    color: #6c757d;
    display: flex;
    align-items: center;
}

.avatar.bi {
    font-size: 60px;
    color: #6c757d;
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
}

/* Email Screen */

.email-screen {
    width: 100%;
    height: calc(100% - 20px);
    background: white;
    position: absolute;
    top: 20px;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.email-header {
    border-bottom: 1px solid #dee2e6;
    padding: 15px !important;
    font-size: 18px;
}

.email-message {
    flex: 1;
    overflow-y: auto;
}

.email-attachment {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: inline-block;
    cursor: pointer;
}

.email-attachment:hover {
    background: #e9ecef;
}

.attachment-name {
    font-size: 14px;
    color: #0066cc;
    text-decoration: underline;
}

.error-modal .modal-content {
    border-radius: 15px;
}

.error-modal .modal-body {
    padding: 2rem !important;
}

.error-modal .btn {
    min-width: 100px;
}